* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
authorAlan Modra <amodra@gmail.com>
Wed, 5 Jun 2002 14:07:29 +0000 (14:07 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 5 Jun 2002 14:07:29 +0000 (14:07 +0000)
SEC_EXCLUDE sections when doing a relocatable link.

ld/ChangeLog
ld/emultempl/elf32.em

index f4fc0994466d5e0793b9f52587b86ca7e5dab49b..993eeb2af22494951862bafa2b0e1afbe7009a69 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-05  Alan Modra  <amodra@bigpond.net.au>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place
+       SEC_EXCLUDE sections when doing a relocatable link.
+
 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o,
index b1e7dd3164327ee1e148f3bc8e91e496833aa2e8..e854c2a3fbe4670c62e26d21ed9c0402e264b011 100644 (file)
@@ -1107,7 +1107,7 @@ gld${EMULATION_NAME}_place_orphan (file, s)
 #define HAVE_SECTION(hold, name) \
 (hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
 
-  if (s->flags & SEC_EXCLUDE)
+  if ((s->flags & SEC_EXCLUDE) != 0 && !link_info.relocateable)
     {
       if (s->output_section == NULL)
        s->output_section = bfd_abs_section_ptr;