diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2006-02-20 20:11:00 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2006-02-20 20:11:00 +0000 |
commit | 72aa65a751ee21d0af8249b939f0e6cceb7afc87 (patch) | |
tree | 5eb7849e10ef41fca1c1b16c86f06113958c3ef6 /ld/testsuite | |
parent | 17fbb0bdc7f49801a09bffc483ccd1fd5ab21403 (diff) | |
download | fsf-binutils-gdb-72aa65a751ee21d0af8249b939f0e6cceb7afc87.zip fsf-binutils-gdb-72aa65a751ee21d0af8249b939f0e6cceb7afc87.tar.gz fsf-binutils-gdb-72aa65a751ee21d0af8249b939f0e6cceb7afc87.tar.bz2 |
2006-02-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2218
* ld-pie/pie.exp: Add the weak undefined data test.
* ld-pie/weakundef-data.c: New file.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-pie/pie.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-pie/weakundef-data.c | 15 |
3 files changed, 25 insertions, 2 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 3d964b0..13d8d5f 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,6 +1,13 @@ +2006-02-20 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/2218 + * ld-pie/pie.exp: Add the weak undefined data test. + + * ld-pie/weakundef-data.c: New file. + 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com> - Anil Paranjape <anilp1@kpitcummins.com> - Shilin Shakti <shilins@kpitcummins.com> + Anil Paranjape <anilp1@kpitcummins.com> + Shilin Shakti <shilins@kpitcummins.com> * ld-xc16x: New directory. * ld-xc16x/absrel.d: New file. diff --git a/ld/testsuite/ld-pie/pie.exp b/ld/testsuite/ld-pie/pie.exp index 48a42e4..513cdfd 100644 --- a/ld/testsuite/ld-pie/pie.exp +++ b/ld/testsuite/ld-pie/pie.exp @@ -26,6 +26,7 @@ if { ![istarget *-*-linux*] } { set array_tests { {"weak undefined" "-pie" "" {weakundef.c} "weakundef" "weakundef.out" "-fPIC"} + {"weak undefined data" "-pie" "" {weakundef-data.c} "weakundef-data" "weakundef.out" "-fPIC"} } run_ld_link_exec_tests [] $array_tests diff --git a/ld/testsuite/ld-pie/weakundef-data.c b/ld/testsuite/ld-pie/weakundef-data.c new file mode 100644 index 0000000..0d0f162 --- /dev/null +++ b/ld/testsuite/ld-pie/weakundef-data.c @@ -0,0 +1,15 @@ +#include <stdio.h> + +#pragma weak undef_data + +extern int undef_data (void); +int (*ptr_to_data)(void) = undef_data; + +int +main (void) +{ + if (ptr_to_data == NULL) + printf ("PASSED\n"); + + return 0; +} |