From 365f913182f2ebf3e2bb78354f49615def4b179e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 23 Apr 2003 16:34:39 +0000 Subject: [PATCH] 2003-04-23 H.J. Lu * ld-elfvers/vers.exp (objdump_dynsymstuff): Support empty files. (objdump_versionstuff): Likewise. Add tests vers25a, vers25b1 and vers25b2 for versioned definition vs. normal definition in different files. * ld-elfvers/vers25a.c: New file. * ld-elfvers/vers25a.dsym: Likewise. * ld-elfvers/vers25a.map: Likewise. * ld-elfvers/vers25a.ver: Likewise. * ld-elfvers/vers25b.c: New empty file. * ld-elfvers/vers25b.dsym: Likewise. * ld-elfvers/vers25b.ver: Likewise. --- ld/testsuite/ChangeLog | 17 +++++++++++++++++ ld/testsuite/ld-elfvers/vers.exp | 15 +++++++++++++++ ld/testsuite/ld-elfvers/vers25b.c | 0 ld/testsuite/ld-elfvers/vers25b.dsym | 0 ld/testsuite/ld-elfvers/vers25b.ver | 0 5 files changed, 32 insertions(+) create mode 100644 ld/testsuite/ld-elfvers/vers25b.c create mode 100644 ld/testsuite/ld-elfvers/vers25b.dsym create mode 100644 ld/testsuite/ld-elfvers/vers25b.ver diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 66c2049a2bc..f4ff325d017 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2003-04-23 H.J. Lu + + * ld-elfvers/vers.exp (objdump_dynsymstuff): Support empty + files. + (objdump_versionstuff): Likewise. + Add tests vers25a, vers25b1 and vers25b2 for versioned + definition vs. normal definition in different files. + + * ld-elfvers/vers25a.c: New file. + * ld-elfvers/vers25a.dsym: Likewise. + * ld-elfvers/vers25a.map: Likewise. + * ld-elfvers/vers25a.ver: Likewise. + + * ld-elfvers/vers25b.c: New empty file. + * ld-elfvers/vers25b.dsym: Likewise. + * ld-elfvers/vers25b.ver: Likewise. + 2003-04-22 H.J. Lu * ld-elfcomm/elfcomm.exp: Support 64bit targets. diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 68b5b08e58c..3d642bc0234 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -351,6 +351,11 @@ proc objdump_dynsymstuff { objdump object expectfile } { } close $file_b + # Support empty files. + if { ![info exists list_a] && ![info exists list_b] } then { + return 1 + } + for { set i 0 } { $i < [llength $list_b] } { incr i } { set line_b [lindex $list_b $i] @@ -446,6 +451,11 @@ proc objdump_versionstuff { objdump object expectfile } { close $f1 close $f2 + # Support empty expected file. + if [string match "" $l2] then { + return 1 + } + verbose -log "Did not find \"$l2\"" set f1 [open $tmpdir/objdump.out r] while { [gets $f1 l1] != -1 } { @@ -863,3 +873,8 @@ run_ld_link_tests [list "\"vers24c\" \"-shared --version-script $srcdir/$subdir/vers24.map\" \"$as_pic_flags\" {vers24c.c} { { readelf -Wrs vers24.rd } } \"libvers24c.so\" \"-fpic\""] + +# Test versioned definition vs. normal definition in different files. +build_vers_lib "vers25a" vers25a.c vers25a "" vers25a.map vers25a.ver vers25a.dsym "" +build_vers_lib "vers25b1" vers25b.c vers25b1 "vers25a.o vers25a.so" "" vers25b.ver vers25b.dsym "" +build_vers_lib "vers25b2" vers25b.c vers25b2 "vers25a.so vers25a.o" "" vers25b.ver vers25b.dsym "" diff --git a/ld/testsuite/ld-elfvers/vers25b.c b/ld/testsuite/ld-elfvers/vers25b.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ld/testsuite/ld-elfvers/vers25b.dsym b/ld/testsuite/ld-elfvers/vers25b.dsym new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ld/testsuite/ld-elfvers/vers25b.ver b/ld/testsuite/ld-elfvers/vers25b.ver new file mode 100644 index 00000000000..e69de29bb2d -- 2.30.2