diff options
author | Alan Modra <amodra@gmail.com> | 2005-07-15 12:18:01 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-07-15 12:18:01 +0000 |
commit | eaae8ded6211112d8b3f31b095433d660bcc5e59 (patch) | |
tree | 12928118eb2627deb54fadeacf82f2f133fc3308 /bfd/elflink.c | |
parent | 265eeb58f37c15a72f247f39ecefad113373d0ba (diff) | |
download | gdb-eaae8ded6211112d8b3f31b095433d660bcc5e59.zip gdb-eaae8ded6211112d8b3f31b095433d660bcc5e59.tar.gz gdb-eaae8ded6211112d8b3f31b095433d660bcc5e59.tar.bz2 |
* elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
(_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
defined in output sections. Call bfd_elf_record_link_assignment.
* bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 791575b..7307c15 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -433,8 +433,7 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, this in case some dynamic object refers to this symbol. */ bfd_boolean -bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info, +bfd_elf_record_link_assignment (struct bfd_link_info *info, const char *name, bfd_boolean provide) { @@ -9843,8 +9842,13 @@ _bfd_elf_provide_symbol (struct bfd_link_info *info, const char *name, { struct elf_link_hash_entry *h; + bfd_elf_record_link_assignment (info, name, TRUE); + h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE, FALSE); - if (h != NULL && !h->def_regular) + if (h != NULL + && !(h->root.type == bfd_link_hash_defined + && h->root.u.def.section != NULL + && h->root.u.def.section != h->root.u.def.section->output_section)) bfd_elf_set_symbol (h, val, s); } |