mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
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.
16 lines
200 B
C
16 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;
|
|
}
|