ld: Set non_ir_ref_regular on symbols referenced in regular objects
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Nov 2017 11:48:25 +0000 (03:48 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Nov 2017 11:48:44 +0000 (03:48 -0800)
commita83ef4d139c377e0e87d105977d85c6ef9fbb162
tree5c962499a8395d45d1d270f31a94f381ea0a7b6c
parentf0531ed6a429b0e6e6509e6852ccd3586f3fa1bd
ld: Set non_ir_ref_regular on symbols referenced in regular objects

If linker plugin is enabled, set non_ir_ref_regular on symbols referenced
in regular objects so that linker plugin will get the correct symbol
resolution.

bfd/

PR ld/22502
* elflink.c (_bfd_elf_merge_symbol): Also skip definition from
an IR object.
(elf_link_add_object_symbols): If linker plugin is enabled, set
non_ir_ref_regular on symbols referenced in regular objects so
that linker plugin will get the correct symbol resolution.

ld/

PR ld/22502
* testsuite/ld-plugin/lto.exp: Run PR ld/22502 test.
* testsuite/ld-plugin/pr22502a.c: New file.
* testsuite/ld-plugin/pr22502b.c: Likewise.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr22502a.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr22502b.c [new file with mode: 0644]
This page took 0.02439 seconds and 4 git commands to generate.