a10e6b21d4
PR ld/2218 * ld-pie/pie.exp: New file. * ld-pie/weakundef.c: Likewise. * ld-pie/weakundef.out: Likewise. * lib/ld-lib.exp (run_ld_link_exec_tests): Fix nesting. Support building PIE and shared library.
15 lines
200 B
C
15 lines
200 B
C
#include <stdio.h>
|
|
|
|
#pragma weak undef_func
|
|
|
|
extern int undef_func (void);
|
|
int (*ptr_to_func)(void) = undef_func;
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
if (ptr_to_func == NULL)
|
|
printf ("PASSED\n");
|
|
|
|
return 0;
|
|
}
|