diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2003-05-08 05:10:47 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2003-05-08 05:10:47 +0000 |
commit | 0ae911fecd61c0c5cc0513d6d6a8af4dcf8ccbd0 (patch) | |
tree | b6cac3113ee9fe85eb63e7db93150287339e7ff2 /ld/testsuite | |
parent | 1750fa042b515e5e04f2f601e57948ff7eff0c2d (diff) | |
download | gdb-0ae911fecd61c0c5cc0513d6d6a8af4dcf8ccbd0.zip gdb-0ae911fecd61c0c5cc0513d6d6a8af4dcf8ccbd0.tar.gz gdb-0ae911fecd61c0c5cc0513d6d6a8af4dcf8ccbd0.tar.bz2 |
2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
* ld-elfvers/vers.exp (build_binary): Support build exeutable.
(build_binary): Renamed from ...
(build_vers_lib): This.
(build_vers_lib_no_pic): Updated.
(build_vers_lib_pic): Likewise.
Add vers27d1, vers27d2 and vers27d3 to test versioned
definition for hidden symbol referenced by a DSO.
* ld-elfvers/vers27d.dsym: New file.
* ld-elfvers/vers27d.sym: Likewise.
* ld-elfvers/vers27d.ver: Likewise.
* ld-elfvers/vers27d1.c: Likewise.
* ld-elfvers/vers27d2.c: Likewise.
* ld-elfvers/vers27d3.c: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvers/vers.exp | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvers/vers27d.dsym | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvers/vers27d.sym | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvers/vers27d.ver | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvers/vers27d1.c | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvers/vers27d2.c | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elfvers/vers27d3.c | 11 |
8 files changed, 60 insertions, 4 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index b78599f..0da2fb8 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2003-05-07 H.J. Lu <hongjiu.lu@intel.com> + + * ld-elfvers/vers.exp (build_binary): Support build exeutable. + (build_binary): Renamed from ... + (build_vers_lib): This. + (build_vers_lib_no_pic): Updated. + (build_vers_lib_pic): Likewise. + Add vers27d1, vers27d2 and vers27d3 to test versioned + definition for hidden symbol referenced by a DSO. + + * ld-elfvers/vers27d.dsym: New file. + * ld-elfvers/vers27d.sym: Likewise. + * ld-elfvers/vers27d.ver: Likewise. + * ld-elfvers/vers27d1.c: Likewise. + * ld-elfvers/vers27d2.c: Likewise. + * ld-elfvers/vers27d3.c: Likewise. + 2003-05-07 Andreas Schwab <schwab@suse.de> * ld-elfvsb/elfvsb.exp: Run dump tests even when cross diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index c28733e..97cfaf3 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -497,7 +497,7 @@ proc objdump_versionstuff { objdump object expectfile } { } } -proc build_vers_lib { pic test source libname other mapfile verexp versymexp symexp } { +proc build_binary { shared pic test source libname other mapfile verexp versymexp symexp } { global ld global srcdir global subdir @@ -508,7 +508,6 @@ proc build_vers_lib { pic test source libname other mapfile verexp versymexp sym global objdump global CC global CFLAGS - global shared global script if ![ld_compile "$CC -S $pic $CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s] { @@ -565,13 +564,19 @@ proc build_vers_lib { pic test source libname other mapfile verexp versymexp sym } +proc build_executable { test source libname other mapfile verexp versymexp symexp } { + build_binary "" "" $test $source $libname $other $mapfile $verexp $versymexp $symexp +} + proc build_vers_lib_no_pic { test source libname other mapfile verexp versymexp symexp } { - build_vers_lib "" $test $source $libname $other $mapfile $verexp $versymexp $symexp + global shared + build_binary $shared "" $test $source $libname $other $mapfile $verexp $versymexp $symexp } proc build_vers_lib_pic { test source libname other mapfile verexp versymexp symexp } { global picflag - build_vers_lib $picflag $test $source $libname $other $mapfile $verexp $versymexp $symexp + global shared + build_binary $shared $picflag $test $source $libname $other $mapfile $verexp $versymexp $symexp } proc test_ldfail { test flag source execname other mapfile whyfail } { @@ -929,3 +934,6 @@ build_vers_lib_no_pic "vers27a" vers27a.c vers27a "" vers27a.map vers27a.ver ver build_vers_lib_no_pic "vers27b" vers27b.c vers27b "" "" vers27b.ver vers27b.dsym "" build_vers_lib_no_pic "vers27c1" vers27c.c vers27c1 "vers27b.o vers27a.so" "" vers27c.ver vers27c.dsym "" build_vers_lib_no_pic "vers27c2" vers27c.c vers27c2 "vers27a.so vers27b.o" "" vers27c.ver vers27c.dsym "" +build_vers_lib_pic "vers27d1" vers27d1.c vers27d1 "" vers27a.map vers27d.ver vers27d.dsym vers27d.sym +build_vers_lib_pic "vers27d2" vers27d2.c vers27d2 "" "" vers27b.ver vers27b.dsym "" +build_executable "vers27d3" vers27d3.c vers27d3 "vers27b.o vers27d2.so vers27d1.so" "" vers27b.ver vers27b.dsym "" diff --git a/ld/testsuite/ld-elfvers/vers27d.dsym b/ld/testsuite/ld-elfvers/vers27d.dsym new file mode 100644 index 0000000..9813d95 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers27d.dsym @@ -0,0 +1,2 @@ +[0]*[ ]+g[ ]+DO[ ]+\*ABS\*[ ]+[0]*[ ]+VERS.0[ ]+VERS.0 +[0-9a-f]*[ ]+g[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+\(VERS.0\)[ ]+(0x[0-9a-f]*|)[ ]*foo diff --git a/ld/testsuite/ld-elfvers/vers27d.sym b/ld/testsuite/ld-elfvers/vers27d.sym new file mode 100644 index 0000000..2069993 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers27d.sym @@ -0,0 +1 @@ +[0-9a-f]*[ ]+g[ ]+F[ ]+.text[ ]+[0-9a-f]* (0x[0-9a-f][0-9a-f] )?foo@VERS.0 diff --git a/ld/testsuite/ld-elfvers/vers27d.ver b/ld/testsuite/ld-elfvers/vers27d.ver new file mode 100644 index 0000000..672c7ad --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers27d.ver @@ -0,0 +1,4 @@ +Version definitions: +1 0x01 0x05ac0cff vers27d1.so +2 0x00 0x05aa7610 VERS.0 + diff --git a/ld/testsuite/ld-elfvers/vers27d1.c b/ld/testsuite/ld-elfvers/vers27d1.c new file mode 100644 index 0000000..3fc60b0 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers27d1.c @@ -0,0 +1,6 @@ +void +foo () +{ +} + +asm (".symver foo,foo@VERS.0"); diff --git a/ld/testsuite/ld-elfvers/vers27d2.c b/ld/testsuite/ld-elfvers/vers27d2.c new file mode 100644 index 0000000..a98f38a --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers27d2.c @@ -0,0 +1,7 @@ +void foo (); + +void +ref () +{ + foo (); +} diff --git a/ld/testsuite/ld-elfvers/vers27d3.c b/ld/testsuite/ld-elfvers/vers27d3.c new file mode 100644 index 0000000..e72d6f8 --- /dev/null +++ b/ld/testsuite/ld-elfvers/vers27d3.c @@ -0,0 +1,11 @@ +extern void ref (); +extern void foo (); + +void _start() __asm__("_start"); + +void +_start () +{ + foo (); + ref (); +} |