diff options
author | Alan Modra <amodra@gmail.com> | 2011-10-25 02:52:23 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-10-25 02:52:23 +0000 |
commit | fac68c2951e62ed105258b64bcda367fdedc9dd0 (patch) | |
tree | 90b1d6459c27a09475dac09d5beb660b1335c5ac | |
parent | 044fb1867a7b419c0e21d6da15d7ab8c62eda1aa (diff) | |
download | gdb-fac68c2951e62ed105258b64bcda367fdedc9dd0.zip gdb-fac68c2951e62ed105258b64bcda367fdedc9dd0.tar.gz gdb-fac68c2951e62ed105258b64bcda367fdedc9dd0.tar.bz2 |
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.
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elflink.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b4ee586..1399037 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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. diff --git a/bfd/elflink.c b/bfd/elflink.c index 33a1a63..c1b5bee 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -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) |