mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
3355cb3b64
The plugin is called to claim symbols in an archive element from plugin_object_p. But those symbols aren't needed to create output. They are defined and referenced only within IR. get_symbols should return resolution based on IR symbol kinds. PR ld/20070 * Makefile.am (noinst_LTLIBRARIES): Add libldtestplug4.la. (libldtestplug4_la_SOURCES): New. (libldtestplug4_la_CFLAGS): Likewise. (libldtestplug4_la_LDFLAGS): Likewise. * Makefile.in: Regenerated. * plugin.c (get_symbols): Return resolution based on IR symbol kinds for symbols defined/referenced only within IR. * testplug4.c: New file. * ld/testsuite/ld-plugin/pr20070.d: Likewise. * ld/testsuite/ld-plugin/pr20070a.c: Likewise. * ld/testsuite/ld-plugin/pr20070b.c: Likewise. * testsuite/ld-plugin/plugin.exp (plugin4_name): New. (plugin4_path): Likewise. Add a test for ld/20070.
10 lines
333 B
Makefile
10 lines
333 B
Makefile
hook called: all symbols read.
|
|
Input: pr20070b.c \(tmpdir/libpr20070.a\)
|
|
Sym: 'def' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
|
Sym: 'weakdef' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
|
Sym: 'undef' Resolution: LDPR_UNDEF
|
|
Sym: 'weakundef' Resolution: LDPR_UNDEF
|
|
Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
|
hook called: cleanup.
|
|
#...
|