aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-06-18 09:19:34 +0930
committerAlan Modra <amodra@gmail.com>2017-06-18 11:56:19 +0930
commitbdd32e03c5e87bd38e63e9cc3fd35375241db58f (patch)
tree814e2bc82a15590c266720e7b58ccef5ed94714b /ld/testsuite/lib/ld-lib.exp
parentAutomatic date update in version.in (diff)
downloadbinutils-gdb-bdd32e03c5e87bd38e63e9cc3fd35375241db58f.tar.gz
binutils-gdb-bdd32e03c5e87bd38e63e9cc3fd35375241db58f.tar.bz2
binutils-gdb-bdd32e03c5e87bd38e63e9cc3fd35375241db58f.zip
is_underscore_target for ld-elf tests
and correct targ_underscore in config.bfd bfd/ * config.bfd: Correct targ_underscore for epiphany, ip2k, m32c, mn10200, pru, rl78, rx, crisv32 and v850. ld/ * testsuite/lib/ld-lib.exp (is_underscore_target): New. * testsuite/ld-elf/elf.exp (ASFLAGS): Define UNDERSCORE. * testsuite/ld-elf/pr21562a.s: If UNDERSCORE defined, reference sym with prefix. * testsuite/ld-elf/pr21562b.s: Likewise. * testsuite/ld-elf/sizeof.s: Likewise. * testsuite/ld-elf/startof.s: Likewise. * testsuite/ld-elf/pr14156a.d: Adjust for extra symbols. * testsuite/ld-elf/pr21562a.d: Remove underscore target from xfails, and match prefixed symbol. * testsuite/ld-elf/pr21562b.d: Likewise. * testsuite/ld-elf/pr21562c.d: Likewise. * testsuite/ld-elf/pr21562d.d: Likewise. * testsuite/ld-elf/pr21562e.d: Likewise. * testsuite/ld-elf/pr21562f.d: Likewise. * testsuite/ld-elf/pr21562g.d: Likewise. * testsuite/ld-elf/pr21562h.d: Likewise. * testsuite/ld-elf/pr21562i.d: Likewise. * testsuite/ld-elf/pr21562j.d: Likewise. * testsuite/ld-elf/pr21562k.d: Likewise. * testsuite/ld-elf/pr21562l.d: Likewise. * testsuite/ld-elf/pr21562m.d: Likewise. * testsuite/ld-elf/pr21562n.d: Likewise. * testsuite/ld-elf/sizeofa.d: Likewise. * testsuite/ld-elf/sizeofb.d: Likewise. * testsuite/ld-elf/sizeofc.d: Likewise. * testsuite/ld-elf/startofa.d: Likewise. * testsuite/ld-elf/startofb.d: Likewise. * testsuite/ld-elf/startofc.d: Likewise.
Diffstat (limited to 'ld/testsuite/lib/ld-lib.exp')
-rw-r--r--ld/testsuite/lib/ld-lib.exp19
1 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index aecc7008385..cddcaf834b2 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1858,6 +1858,25 @@ proc is_generic_elf { } {
return 0;
}
+proc is_underscore_target { } {
+ global is_underscore_target_saved
+ global target_triplet
+ global srcdir
+
+ if { ![info exists is_underscore_target_saved] } {
+ set cmd "targ=$target_triplet . $srcdir/../../bfd/config.bfd &&"
+ append cmd { echo "$targ_underscore"}
+ verbose -log "$cmd"
+ set status [catch {exec sh -c $cmd} result]
+ if { $status == 0 && [string match "yes" $result] } {
+ set is_underscore_target_saved 1
+ } else {
+ set is_underscore_target_saved 0
+ }
+ }
+ return $is_underscore_target_saved
+}
+
# Returns true if the target ld supports the plugin API.
proc check_plugin_api_available { } {
global plugin_api_available_saved