aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-srec/srec.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-srec/srec.exp')
-rw-r--r--ld/testsuite/ld-srec/srec.exp34
1 files changed, 28 insertions, 6 deletions
diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp
index ce1bda9..256e7b9 100644
--- a/ld/testsuite/ld-srec/srec.exp
+++ b/ld/testsuite/ld-srec/srec.exp
@@ -212,6 +212,20 @@ proc run_srec_test { test objs } {
set flags ""
+ # g++ sometimes generates references to __get_dynamic_handler_chain.
+ set flags "$flags --defsym __get_dynamic_handler_chain=0"
+ set flags "$flags --defsym ___get_dynamic_handler_chain=0"
+
+ # The mn10200 has out of line prologues and epilogues which the
+ # comiler uses when compiling the testcase. Define them so that
+ # we don't need to bring in libgcc.a
+ if [istarget mn10200-*-*] {
+ set flags "$flags --defsym ___prologue=0"
+ set flags "$flags --defsym ___epilogue_noreturn=0"
+ set flags "$flags --defsym ___epilogue_d0=0"
+ set flags "$flags --defsym ___epilogue_a0=0"
+ }
+
# If the linker script uses SIZEOF_HEADERS, use a -Ttext argument
# to force both the normal link and the S-record link to be put in
# the same place. We don't always use -Ttext because it interacts
@@ -228,8 +242,14 @@ proc run_srec_test { test objs } {
set flags "$flags --defsym V_SPILL=0 --defsym V_FILL=0"
}
+ # PowerPC EABI code calls __eabi.
+ if [istarget powerpc*-*-eabi*] {
+ set flags "$flags --defsym __eabi=0"
+ }
+
if { ![ld_simple_link $ld tmpdir/sr1 "$flags $objs"] \
|| ![ld_simple_link $ld tmpdir/sr2.sr "$flags -oformat srec $objs"] } {
+ setup_xfail "hppa*-*-*elf*"
fail $test
return
}
@@ -237,7 +257,7 @@ proc run_srec_test { test objs } {
send_log "$objcopy -O srec tmpdir/sr1 tmpdir/sr1.sr\n"
verbose "$objcopy -O srec tmpdir/sr1 tmpdir/sr1.sr"
catch "exec $objcopy -O srec tmpdir/sr1 tmpdir/sr1.sr" exec_output
- set exec_output [prune_system_crud $host_triplet $exec_output]
+ set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
@@ -285,14 +305,15 @@ if { ![ld_compile $CC $srcdir/$subdir/sr1.c tmpdir/sr1.o] \
# sections where objdump finds them. I don't know which is wrong.
setup_xfail "i*86-*-aout*"
-# These tests fail on the MIPS ELF target because the GP value in the
-# .reginfo section is not updated when the S-record version is written
-# out.
-setup_xfail "mips*-*-elf*" "mips*-*-irix5*" "mips*-*-irix6*"
+# These tests fail on the native MIPS ELF targets because the GP value
+# in the .reginfo section is not updated when the S-record version is
+# written out. The mips-elf target itself does not use a .reginfo section.
+setup_xfail "mips*-*-irix5*" "mips*-*-irix6*"
# The S-record linker doesn't do the magic TOC handling that XCOFF
# linkers do.
setup_xfail "*-*-aix*" "*-*-xcoff*"
+setup_xfail "arm-*-coff"
run_srec_test $test1 "tmpdir/sr1.o tmpdir/sr2.o"
@@ -312,7 +333,8 @@ if ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/sr3.cc tmpdir/sr3.
# See above.
setup_xfail "i*86-*-aout*"
-setup_xfail "mips*-*-elf*" "mips*-*-irix5*" "mips*-*-irix6*"
+setup_xfail "mips*-*-irix5*" "mips*-*-irix6*"
setup_xfail "*-*-aix*" "*-*-xcoff*"
+setup_xfail "arm-*-coff"
run_srec_test $test2 "tmpdir/sr3.o"