diff options
author | Alan Modra <amodra@gmail.com> | 2005-02-02 02:36:35 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-02-02 02:36:35 +0000 |
commit | ec13b3bb1f3ba22763e9ea1b0b1cecd1dbc74652 (patch) | |
tree | 4bd21c40707e1e1a250462aa455a864c756a69aa /bfd | |
parent | 336549c1f5f607f216a31f10511566f7939e0287 (diff) | |
download | gdb-ec13b3bb1f3ba22763e9ea1b0b1cecd1dbc74652.zip gdb-ec13b3bb1f3ba22763e9ea1b0b1cecd1dbc74652.tar.gz gdb-ec13b3bb1f3ba22763e9ea1b0b1cecd1dbc74652.tar.bz2 |
* elflink.c (elf_smash_syms): Expand comments.
(elf_link_add_object_symbols): Only call elf_smash_syms for
as-needed dynamic objects.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 12 | ||||
-rw-r--r-- | bfd/elflink.c | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 699bcc1..c942cff 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,9 @@ 2005-02-02 Alan Modra <amodra@bigpond.net.au> + * elflink.c (elf_smash_syms): Expand comments. + (elf_link_add_object_symbols): Only call elf_smash_syms for + as-needed dynamic objects. + * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear everything, just the field specific to ia64. * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise. @@ -93,7 +97,7 @@ * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set SHF_WRITE for .init_array, .fini_array, and .preinit_array. - + 2005-01-31 Nick Clifton <nickc@redhat.com> * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos, @@ -115,9 +119,9 @@ * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype. * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag. (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for - passing flag value from ld. Set flag value in global hash table entry. + passing flag value from ld. Set flag value in global hash table entry. (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX - relocation. + relocation. 2005-01-27 Andrew Cagney <cagney@gnu.org> @@ -126,7 +130,7 @@ 2005-01-25 Mark Mitchell <mark@codesourcery.com> * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for - SymbianOS. + SymbianOS. 2005-01-25 Alexandre Oliva <aoliva@redhat.com> diff --git a/bfd/elflink.c b/bfd/elflink.c index 9d07c4c..0e8bff4 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2815,7 +2815,12 @@ elf_add_dt_needed_tag (bfd *abfd, /* Called via elf_link_hash_traverse, elf_smash_syms sets all symbols belonging to NOT_NEEDED to bfd_link_hash_new. We know there are no - references to these symbols. */ + references from regular objects to these symbols. + + ??? Should we do something about references from other dynamic + obects? If not, we potentially lose some warnings about undefined + symbols. But how can we recover the initial undefined / undefweak + state? */ struct elf_smash_syms_data { @@ -4094,8 +4099,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) free (isymbuf); isymbuf = NULL; - if (!add_needed) + if (!add_needed + && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0) { + /* Remove symbols defined in an as-needed shared lib that wasn't + needed. */ struct elf_smash_syms_data inf; inf.not_needed = abfd; inf.htab = hash_table; |