diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-08-31 04:47:41 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-08-31 04:48:05 -0700 |
commit | e9d644e8fb2e7fa2f61e4b978f75881d906e0dbc (patch) | |
tree | a02c2c595bc617546cdb97267e72ada0a0fbf84c /ld | |
parent | 9a8d6a757d29ad8c80dc7640ac902d722b1b473f (diff) | |
download | binutils-e9d644e8fb2e7fa2f61e4b978f75881d906e0dbc.zip binutils-e9d644e8fb2e7fa2f61e4b978f75881d906e0dbc.tar.gz binutils-e9d644e8fb2e7fa2f61e4b978f75881d906e0dbc.tar.bz2 |
ld: Append -mx86-used-note=no to ASFLAGS
Since x86 assembler may generate .note.gnu.property section, append
-mx86-used-note=no to tests which don't expect .note.gnu.property
section on ELF/x86 targets.
* testsuite/ld-elf/elf.exp (ASFLAGS): Save, append
-mx86-used-note=no and restore.
* testsuite/ld-ifunc/ifunc.exp (ASFLAGS): Likewise.
* testsuite/ld-scripts/defined.exp (ASFLAGS): Likewise.
* testsuite/ld-scripts/overlay-size.exp (ASFLAGS): Likewise
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc.exp | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/defined.exp | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/overlay-size.exp | 9 |
5 files changed, 41 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index a773d9e..2d1e900 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,13 @@ 2018-08-31 H.J. Lu <hongjiu.lu@intel.com> + * testsuite/ld-elf/elf.exp (ASFLAGS): Save, append + -mx86-used-note=no and restore. + * testsuite/ld-ifunc/ifunc.exp (ASFLAGS): Likewise. + * testsuite/ld-scripts/defined.exp (ASFLAGS): Likewise. + * testsuite/ld-scripts/overlay-size.exp (ASFLAGS): Likewise. + +2018-08-31 H.J. Lu <hongjiu.lu@intel.com> + * testsuite/ld-srec/srec.exp: Append -Wa,-mx86-used-note=no to CC and CXX on ELF/x86 targets. diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index bb7f4b0..96ee01f 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -95,6 +95,12 @@ if [is_underscore_target] { set ASFLAGS "$ASFLAGS --defsym UNDERSCORE=1" } +global ASFLAGS +set saved_ASFLAGS "$ASFLAGS" +if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } { + set ASFLAGS "$ASFLAGS -mx86-used-note=no" +} + set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] foreach t $test_list { # We need to strip the ".d", but can leave the dirname. @@ -102,6 +108,8 @@ foreach t $test_list { run_dump_test [file rootname $t] } +set ASFLAGS "$saved_ASFLAGS" + # Targets using the generic linker backend don't support generating # an import library. set xfail_implib "" diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp index 5fee56d..2b8084e 100644 --- a/ld/testsuite/ld-ifunc/ifunc.exp +++ b/ld/testsuite/ld-ifunc/ifunc.exp @@ -45,6 +45,12 @@ if ![check_shared_lib_support] { return } +global ASFLAGS +set saved_ASFLAGS "$ASFLAGS" +if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } { + set ASFLAGS "$ASFLAGS -mx86-used-note=no" +} + # This test does not need a compiler... run_dump_test "ifuncmod5" @@ -770,3 +776,5 @@ run_ld_link_exec_tests [list \ "-fPIE -O2 -g" \ ] \ ]} + +set ASFLAGS "$saved_ASFLAGS" diff --git a/ld/testsuite/ld-scripts/defined.exp b/ld/testsuite/ld-scripts/defined.exp index f3571b8..82e3d09 100644 --- a/ld/testsuite/ld-scripts/defined.exp +++ b/ld/testsuite/ld-scripts/defined.exp @@ -62,6 +62,13 @@ if ![ld_link $ld tmpdir/def "$LDFLAGS -T $srcdir/$subdir/defined.t tmpdir/def.o" } } +global ASFLAGS +set saved_ASFLAGS "$ASFLAGS" +if { [is_elf_format] \ + && ([istarget "i?86-*-*"] || [istarget "x86_64-*-*"]) } { + set ASFLAGS "$ASFLAGS -mx86-used-note=no" +} + set prms_id 0 run_dump_test "defined2" run_dump_test "defined3" @@ -73,3 +80,4 @@ if [is_elf_format] { run_dump_test "defined6" } set LDFLAGS "$saved_LDFLAGS" +set ASFLAGS "$saved_ASFLAGS" diff --git a/ld/testsuite/ld-scripts/overlay-size.exp b/ld/testsuite/ld-scripts/overlay-size.exp index 04c0075..b52eb1b 100644 --- a/ld/testsuite/ld-scripts/overlay-size.exp +++ b/ld/testsuite/ld-scripts/overlay-size.exp @@ -22,4 +22,13 @@ if ![is_elf_format] { return } +global ASFLAGS +set saved_ASFLAGS "$ASFLAGS" +if { [is_elf_format] \ + && ([istarget "i?86-*-*"] || [istarget "x86_64-*-*"]) } { + set ASFLAGS "$ASFLAGS -mx86-used-note=no" +} + run_dump_test overlay-size + +set ASFLAGS "$saved_ASFLAGS" |