mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-19 07:13:40 +08:00
416c34d683
If a symbol is made dynamic by --dynamic-list, it has non-IR reference. bfd/ PR ld/22983 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list. ld/ PR ld/22983 * testsuite/ld-plugin/lto.exp: Run PR ld/22983 test. * testsuite/ld-plugin/pr22983.d: New file. * testsuite/ld-plugin/pr22983.t: Likewise. * testsuite/ld-plugin/pr22983a.c: Likewise. * testsuite/ld-plugin/pr22983b.c: Likewise.
15 lines
387 B
C
15 lines
387 B
C
#include <stdio.h>
|
|
|
|
int func_attr_used_disabled(int val);
|
|
int func_attr_used_enabled(int val);
|
|
extern int var_attr_used_enabled;
|
|
extern int var_attr_used_disabled;
|
|
|
|
int main(int argc, const char **argv){
|
|
printf("%d\n", var_attr_used_disabled);
|
|
printf("%d\n", var_attr_used_enabled);
|
|
printf("%d\n", func_attr_used_disabled(1));
|
|
printf("%d\n", func_attr_used_enabled(1));
|
|
return 0;
|
|
}
|