]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Apply mainline patches
authorAlan Modra <amodra@gmail.com>
Tue, 25 Oct 2011 02:52:23 +0000 (02:52 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Oct 2011 02:52:23 +0000 (02:52 +0000)
2011-10-08  Alan Modra  <amodra@gmail.com>
* elflink.c (elf_link_output_extsym): Strip defined plugin symbols
even when strip_discarded is false.

bfd/ChangeLog
bfd/elflink.c

index b4ee586591019b80bb2fd480e93a0fdaa27e0b31..1399037e781070ce30eecee605800637b7026be6 100644 (file)
@@ -1,6 +1,10 @@
 2011-10-25  Alan Modra  <amodra@gmail.com>
 
        Apply mainline patches
+       2011-10-08  Alan Modra  <amodra@gmail.com>
+       * elflink.c (elf_link_output_extsym): Strip defined plugin symbols
+       even when strip_discarded is false.
+
        2011-09-30  Alan Modra  <amodra@gmail.com>
        PR ld/13235
        * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add ha_relocs_not_using_r2.
index 33a1a63cb42062fb1cbd041f0ff7a11e1475d01c..c1b5bee357b0ec5f76f62712de0c9a0778e84b9b 100644 (file)
@@ -8679,10 +8679,12 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
           && bfd_hash_lookup (finfo->info->keep_hash,
                               h->root.root.string, FALSE, FALSE) == NULL)
     strip = TRUE;
-  else if (finfo->info->strip_discarded
-          && (h->root.type == bfd_link_hash_defined
-              || h->root.type == bfd_link_hash_defweak)
-          && elf_discarded_section (h->root.u.def.section))
+  else if ((h->root.type == bfd_link_hash_defined
+           || h->root.type == bfd_link_hash_defweak)
+          && ((finfo->info->strip_discarded
+               && elf_discarded_section (h->root.u.def.section))
+              || (h->root.u.def.section->owner != NULL
+                  && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0)))
     strip = TRUE;
   else if ((h->root.type == bfd_link_hash_undefined
            || h->root.type == bfd_link_hash_undefweak)