binutils-gdb/ld/testsuite/ld-elf/data2.c
H.J. Lu a47edf2745 Add a test for weak alias
* ld-elf/data2.c: New file.
	* ld-elf/weakdef1.c: Likewise.

	* ld-elf/shared.exp: Add tests for libdata2 and weakdef1.
2012-07-02 14:40:19 +00:00

10 lines
107 B
C

int foo = 0;
extern int foo_alias __attribute__ ((weak, alias ("foo")));
void
bar (void)
{
foo = -1;
}