binutils-gdb/ld/testsuite/ld-elfweak/aliasmain.c
Alan Modra 40363a913b weak alias test
This adds the test I was using when testing 60d67dc8.

	* testsuite/ld-elfweak/alias.c,
	* testsuite/ld-elfweak/alias.dat,
	* testsuite/ld-elfweak/aliasmain.c,
	* testsuite/ld-elfweak/weakref1.c,
	* testsuite/ld-elfweak/weakref2.c: New test.
	* testsuite/ld-elfweak/elfweak.exp: Run it.  Don't return on fails,
	attempt other tests.
2017-12-01 17:23:56 +10:30

13 lines
194 B
C

#include <stdio.h>
extern int *psym1, *psym2;
extern int strongsym;
int
main (void)
{
printf ("value via psym1: %d, via psym2: %d, strong %d\n",
*psym1, *psym2, strongsym);
return 0;
}