aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-08-31 04:44:45 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-08-31 04:44:59 -0700
commit9a8d6a757d29ad8c80dc7640ac902d722b1b473f (patch)
treee8991fada70520846d8c346e739149db795dece5 /ld/testsuite
parent5e8a54c6c4c753b6bbd447c74f5df8707bb0a06c (diff)
downloadgdb-9a8d6a757d29ad8c80dc7640ac902d722b1b473f.zip
gdb-9a8d6a757d29ad8c80dc7640ac902d722b1b473f.tar.gz
gdb-9a8d6a757d29ad8c80dc7640ac902d722b1b473f.tar.bz2
ld: Append -Wa,-mx86-used-note=no for S-records tests
Since x86 assembler may generate .note.gnu.property section and S-records can't handle .note.gnu.property sections, add -mx86-used-note=no to S-records tests on ELF/x86 targets to avoid .note.gnu.property section. * testsuite/ld-srec/srec.exp: Append -Wa,-mx86-used-note=no to CC and CXX on ELF/x86 targets.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-srec/srec.exp7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp
index d155c18..440112c 100644
--- a/ld/testsuite/ld-srec/srec.exp
+++ b/ld/testsuite/ld-srec/srec.exp
@@ -357,6 +357,13 @@ set CC "$CC $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS"
set old_CXX "$CXX"
set CXX "$CXX $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS"
+# S-records can't handle .note.gnu.property sections.
+if { [is_elf_format] \
+ && ([istarget "i?86-*-*"] || [istarget "x86_64-*-*"]) } {
+ set CC "$CC -Wa,-mx86-used-note=no"
+ set CXX "$CXX -Wa,-mx86-used-note=no"
+}
+
if { ![ld_compile $CC $srcdir/$subdir/sr1.c tmpdir/sr1.o] \
|| ![ld_compile $CC $srcdir/$subdir/sr2.c tmpdir/sr2.o] } {
unresolved $test1