aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-05-17 00:36:30 +0000
committerAlan Modra <amodra@gmail.com>2006-05-17 00:36:30 +0000
commitdea5f36af568ff9a74118333671ac88e95f2ef52 (patch)
tree3096aa169b34307f9cc62deb0c787b50cdd95b06 /bfd/elflink.c
parent74d8661a45c7c1c19b79b0b77279e650f20b066f (diff)
downloadgdb-dea5f36af568ff9a74118333671ac88e95f2ef52.zip
gdb-dea5f36af568ff9a74118333671ac88e95f2ef52.tar.gz
gdb-dea5f36af568ff9a74118333671ac88e95f2ef52.tar.bz2
* elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
non-load sections if they have relocs.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index a1632cc..338ee06 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -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)