* elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
authorAlan Modra <amodra@gmail.com>
Thu, 29 Mar 2012 23:17:37 +0000 (23:17 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 29 Mar 2012 23:17:37 +0000 (23:17 +0000)
libraries.

bfd/ChangeLog
bfd/elflink.c

index 3848bc794bb0735285c06588c1ab9cde2cd3f85e..390cb899f681e3c44e57617d4411e6db5a08ef63 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-30  Alan Modra  <amodra@gmail.com>
+
+       * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
+       libraries.
+
 2012-03-29  Alan Modra  <amodra@gmail.com>
 
        * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
index 3236911744848dd290dc0d43f01cb79588c285c1..12025a3b053745df1a8e29a9d88f91ae66eded95 100644 (file)
@@ -11590,7 +11590,8 @@ _bfd_elf_gc_mark_reloc (struct bfd_link_info *info,
   rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie);
   if (rsec && !rsec->gc_mark)
     {
-      if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour)
+      if (bfd_get_flavour (rsec->owner) != bfd_target_elf_flavour
+         || (rsec->owner->flags & DYNAMIC) != 0)
        rsec->gc_mark = 1;
       else if (!_bfd_elf_gc_mark (info, rsec, gc_mark_hook))
        return FALSE;