mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
a83ef4d139
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.
17 lines
205 B
C
17 lines
205 B
C
#include <stdio.h>
|
|
|
|
volatile int x;
|
|
extern void abort ();
|
|
|
|
__attribute__((weak))
|
|
void foobar (void) { x++; }
|
|
|
|
int main (void)
|
|
{
|
|
foobar ();
|
|
if (x != -1)
|
|
abort ();
|
|
printf ("PASS\n");
|
|
return 0;
|
|
}
|