diff options
author | Alan Modra <amodra@gmail.com> | 2011-04-24 10:02:14 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-04-24 10:02:14 +0000 |
commit | 35ed3f940bd08e98211807604672cccbf2741d8f (patch) | |
tree | 3156db0adf6192e4886956523e669ec350c1039b /bfd/elflink.c | |
parent | 90556b8c94aa9d89ee235b4b2a83aec9ec1dcde3 (diff) | |
download | gdb-35ed3f940bd08e98211807604672cccbf2741d8f.zip gdb-35ed3f940bd08e98211807604672cccbf2741d8f.tar.gz gdb-35ed3f940bd08e98211807604672cccbf2741d8f.tar.bz2 |
PR ld/12365
PR ld/12696
include/
* bfdlink.h (ENUM_BITFIELD): Define.
(struct bfd_link_hash_entry): Make "type" a bitfield. Add "non_ir_ref".
(struct bfd_link_callbacks <notice>): Pass bfd_link_hash_entry pointer
rather than "name".
bfd/
* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
* linker.c (_bfd_link_hash_newfunc): Clear bitfields.
(_bfd_generic_link_add_one_symbol): Update "notice" call.
* elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
it is a redef of an IR symbol in a real BFD.
ld/
* ldmain.c (notice): Delete "name" param, add "h".
* plugin.c (plugin_notice): Likewise. Set non_ir_ref. Handle
redefinitions of IR symbols in real BFDs.
(plugin_multiple_definition, plugin_multiple_common): Delete.
(non_ironly_hash, init_non_ironly_hash): Delete.
(is_visible_from_outside): Traverse entry_symbol chain.
(get_symbols): Use non_ir_ref flag rather than hash lookup.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 3a4d22c..082355d 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1427,7 +1427,10 @@ _bfd_elf_merge_symbol (bfd *abfd, /* Skip weak definitions of symbols that are already defined. */ if (newdef && olddef && newweak) { - *skip = TRUE; + /* Don't skip new non-IR weak syms. */ + if (!((oldbfd->flags & BFD_PLUGIN) != 0 + && (abfd->flags & BFD_PLUGIN) == 0)) + *skip = TRUE; /* Merge st_other. If the symbol already has a dynamic index, but visibility says it should not be visible, turn it into a |