binutils-gdb/ld/testsuite/ld-elf/pr14525.c
H.J. Lu 11cba4accf Provide __executable_start for PIE
ld/

	PR ld/14525
	* scripttempl/elf.sc: Also provide __executable_start for PIE.

ld/testsuite/

	PR ld/14525
	* ld-elf/elf.exp: Run pr14525.

	* ld-elf/pr14525.c: New.
	* ld-elf/pr14525.out: Likewise.
2012-08-31 02:52:14 +00:00

12 lines
149 B
C

#include <stdio.h>
extern void *__executable_start;
int
main()
{
if ((void **) &main >= &__executable_start)
printf ("OK\n");
return 0;
}