* elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.

This commit is contained in:
Alan Modra
2004-08-17 08:51:07 +00:00
parent 0367ecfb78
commit 7c2c850509
2 changed files with 7 additions and 3 deletions

View 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> 2004-08-17 Nick Clifton <nickc@redhat.com>
* (is_arm_mapping_symbol_name): New function - return true * (is_arm_mapping_symbol_name): New function - return true

View 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) for (o = sub->sections; o != NULL; o = o->next)
{ {
/* Keep special sections. Keep .debug sections. */ /* Keep debug and special sections. */
if ((o->flags & SEC_LINKER_CREATED) if ((o->flags & (SEC_DEBUGGING | SEC_LINKER_CREATED)) != 0
|| (o->flags & SEC_DEBUGGING)) || (o->flags & (SEC_ALLOC | SEC_LOAD)) == 0)
o->gc_mark = 1; o->gc_mark = 1;
if (o->gc_mark) if (o->gc_mark)