* elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
authorAlan Modra <amodra@gmail.com>
Tue, 17 Aug 2004 08:51:07 +0000 (08:51 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 17 Aug 2004 08:51:07 +0000 (08:51 +0000)
bfd/ChangeLog
bfd/elflink.c

index a36f0f8225ffab1f4f483309d3931e5aebd092f9..fc164dcc2c2a8fb57082f1d7cf0414555e85679a 100644 (file)
@@ -1,3 +1,7 @@
+2004-08-17  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
+
 2004-08-17  Nick Clifton  <nickc@redhat.com>
 
        * (is_arm_mapping_symbol_name): New function - return true
index 00fa46887e8b0eeb6c44936eb0fe59b3cb420e61..1e2f335d366c4d52c8f3f6a54de25cd578b01045 100644 (file)
@@ -8504,9 +8504,9 @@ elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
 
       for (o = sub->sections; o != NULL; o = o->next)
        {
-         /* Keep special sections.  Keep .debug sections.  */
-         if ((o->flags & SEC_LINKER_CREATED)
-             || (o->flags & SEC_DEBUGGING))
+         /* Keep debug and special sections.  */
+         if ((o->flags & (SEC_DEBUGGING | SEC_LINKER_CREATED)) != 0
+             || (o->flags & (SEC_ALLOC | SEC_LOAD)) == 0)
            o->gc_mark = 1;
 
          if (o->gc_mark)
This page took 0.031468 seconds and 4 git commands to generate.