diff options
Diffstat (limited to 'binutils-2.21/ld/testsuite/ld-pie/weakundef-data.c')
-rw-r--r-- | binutils-2.21/ld/testsuite/ld-pie/weakundef-data.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/binutils-2.21/ld/testsuite/ld-pie/weakundef-data.c b/binutils-2.21/ld/testsuite/ld-pie/weakundef-data.c new file mode 100644 index 0000000..af411bc --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-pie/weakundef-data.c @@ -0,0 +1,15 @@ +#include <stdio.h> + +#pragma weak undef_data + +extern int undef_data; +int *ptr_to_data = &undef_data; + +int +main (void) +{ + if (ptr_to_data == NULL) + printf ("PASSED\n"); + + return 0; +} |