mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 09:09:16 +08:00
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.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
|
||||||
Anil Paranjape <anilp1@kpitcummins.com>
|
Anil Paranjape <anilp1@kpitcummins.com>
|
||||||
Shilin Shakti <shilins@kpitcummins.com>
|
Shilin Shakti <shilins@kpitcummins.com>
|
||||||
|
@ -26,6 +26,7 @@ if { ![istarget *-*-linux*] } {
|
|||||||
|
|
||||||
set array_tests {
|
set array_tests {
|
||||||
{"weak undefined" "-pie" "" {weakundef.c} "weakundef" "weakundef.out" "-fPIC"}
|
{"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
|
run_ld_link_exec_tests [] $array_tests
|
||||||
|
15
ld/testsuite/ld-pie/weakundef-data.c
Normal file
15
ld/testsuite/ld-pie/weakundef-data.c
Normal file
@ -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;
|
||||||
|
}
|
Reference in New Issue
Block a user