PR22220, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY
authorAlan Modra <amodra@gmail.com>
Thu, 28 Sep 2017 07:41:38 +0000 (17:11 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 28 Sep 2017 08:06:36 +0000 (17:36 +0930)
commit1a3b5c34fe371f618402f811a981839c9191ff9f
treeaac6ef259428bece256c9ab1fb0e527e363116d1
parent50300765aa46894d9347f760fd10dab829d564f7
PR22220, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY

non_ir_ref_dynamic wasn't being set in the case where we have a
versioned dynamic symbol definition with a non-versioned matching IR
symbol.

bfd/
PR 22220
* elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
a case where plugin_notice isn't called.
ld/
* testsuite/ld-plugin/pr22220.h,
* testsuite/ld-plugin/pr22220lib.cc,
* testsuite/ld-plugin/pr22220lib.ver,
* testsuite/ld-plugin/pr22220main.cc: New test.
* testsuite/ld-plugin/lto.exp: Run it.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr22220.h [new file with mode: 0644]
ld/testsuite/ld-plugin/pr22220lib.cc [new file with mode: 0644]
ld/testsuite/ld-plugin/pr22220lib.ver [new file with mode: 0644]
ld/testsuite/ld-plugin/pr22220main.cc [new file with mode: 0644]