* elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
authorAlan Modra <amodra@gmail.com>
Wed, 17 May 2006 00:36:30 +0000 (00:36 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 17 May 2006 00:36:30 +0000 (00:36 +0000)
non-load sections if they have relocs.

bfd/ChangeLog
bfd/elflink.c

index fda25296d95ac675efc9821c922f6b06da42297e..503d625fa1e4943c5ec1f1c92c31a8a24bfe7268 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-17  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
+       non-load sections if they have relocs.
+
 2006-05-15  Paul Brook  <paul@codesourcery.com>
 
        * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename ...
index a1632cc3b1c98f2b4337143e176806d0ec8583a2..338ee0610fc68296d20de4d89c15f6b21013c4ce 100644 (file)
@@ -8965,7 +8965,7 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
        {
          /* Keep debug and special sections.  */
          if ((o->flags & (SEC_DEBUGGING | SEC_LINKER_CREATED)) != 0
-             || (o->flags & (SEC_ALLOC | SEC_LOAD)) == 0)
+             || (o->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0)
            o->gc_mark = 1;
 
          if (o->gc_mark)