mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-18 14:53:32 +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.
11 lines
242 B
C
11 lines
242 B
C
int func_attr_used_disabled(int val){
|
|
return val + 1;
|
|
}
|
|
__attribute__((used))
|
|
int func_attr_used_enabled(int val){
|
|
return val + 1;
|
|
}
|
|
__attribute__((used))
|
|
int var_attr_used_enabled = 0b0101010101;
|
|
int var_attr_used_disabled = 0b0101010101;
|