forked from Imagelibrary/binutils-gdb
Add wrapper_symbol to bfd_link_hash_entry and set it to true for wrapper symbol. Set wrap_status to wrapper if wrapper_symbol is true in LTO. Note: Calling unwrap_hash_lookup to check for the wrapper symbol works only when there is a definition for the wrapped symbol since references to the wrapped symbol have been redirected to the wrapper symbol. bfd/ PR ld/31956 * linker.c (bfd_wrapped_link_hash_lookup): Set wrapper_symbol for wrapper symbol. include/ PR ld/31956 * bfdlink.h (bfd_link_hash_entry): Add wrapper_symbol. ld/ PR ld/31956 * plugin.c (get_symbols): Set wrap_status to wrapper if wrapper_symbol is set. * testsuite/ld-plugin/lto.exp: Run PR ld/31956 tests. * testsuite/ld-plugin/pr31956a.c: New file. * testsuite/ld-plugin/pr31956b.c: Likewise. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
24 lines
315 B
C
24 lines
315 B
C
struct CMUnitTest {
|
|
void *test_func;
|
|
};
|
|
|
|
extern void _cmocka_run_group_tests(void *);
|
|
|
|
extern void argv_parse_cmd(void);
|
|
void __wrap_parse_line(void) {};
|
|
|
|
void foo (void) {
|
|
argv_parse_cmd();
|
|
}
|
|
|
|
struct CMUnitTest main_tests = {
|
|
foo
|
|
};
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
_cmocka_run_group_tests (&main_tests);
|
|
return 0;
|
|
}
|