From: Alan Modra Date: Fri, 15 Jul 2005 12:18:01 +0000 (+0000) Subject: * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eaae8ded6211112d8b3f31b095433d660bcc5e59;p=binutils-gdb.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a0782606aa1..7d836d1e3df 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2005-07-15 Alan Modra + + * 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. + 2005-07-14 Jim Blandy Add support for m32c-*-elf (Renesas m32c and m16c). diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 34188d118e9..33e19eac07e 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -633,7 +633,7 @@ enum dynamic_lib_link_class { }; extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean); + (struct bfd_link_info *, const char *, bfd_boolean); extern struct bfd_link_needed_list *bfd_elf_get_needed_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf_get_bfd_needed_list diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 96cf124a851..062a819b160 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -640,7 +640,7 @@ enum dynamic_lib_link_class { }; extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean); + (struct bfd_link_info *, const char *, bfd_boolean); extern struct bfd_link_needed_list *bfd_elf_get_needed_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf_get_bfd_needed_list diff --git a/bfd/elflink.c b/bfd/elflink.c index 791575ba07a..7307c15a4f8 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); }