mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-25 19:02:40 +08:00
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
This commit is contained in:
ld
@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2018-08-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* testsuite/ld-srec/srec.exp: Append -Wa,-mx86-used-note=no to
|
* testsuite/ld-srec/srec.exp: Append -Wa,-mx86-used-note=no to
|
||||||
|
@ -95,6 +95,12 @@ if [is_underscore_target] {
|
|||||||
set ASFLAGS "$ASFLAGS --defsym UNDERSCORE=1"
|
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]]
|
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
|
||||||
foreach t $test_list {
|
foreach t $test_list {
|
||||||
# We need to strip the ".d", but can leave the dirname.
|
# 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]
|
run_dump_test [file rootname $t]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set ASFLAGS "$saved_ASFLAGS"
|
||||||
|
|
||||||
# Targets using the generic linker backend don't support generating
|
# Targets using the generic linker backend don't support generating
|
||||||
# an import library.
|
# an import library.
|
||||||
set xfail_implib ""
|
set xfail_implib ""
|
||||||
|
@ -45,6 +45,12 @@ if ![check_shared_lib_support] {
|
|||||||
return
|
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...
|
# This test does not need a compiler...
|
||||||
run_dump_test "ifuncmod5"
|
run_dump_test "ifuncmod5"
|
||||||
|
|
||||||
@ -770,3 +776,5 @@ run_ld_link_exec_tests [list \
|
|||||||
"-fPIE -O2 -g" \
|
"-fPIE -O2 -g" \
|
||||||
] \
|
] \
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
set ASFLAGS "$saved_ASFLAGS"
|
||||||
|
@ -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
|
set prms_id 0
|
||||||
run_dump_test "defined2"
|
run_dump_test "defined2"
|
||||||
run_dump_test "defined3"
|
run_dump_test "defined3"
|
||||||
@ -73,3 +80,4 @@ if [is_elf_format] {
|
|||||||
run_dump_test "defined6"
|
run_dump_test "defined6"
|
||||||
}
|
}
|
||||||
set LDFLAGS "$saved_LDFLAGS"
|
set LDFLAGS "$saved_LDFLAGS"
|
||||||
|
set ASFLAGS "$saved_ASFLAGS"
|
||||||
|
@ -22,4 +22,13 @@ if ![is_elf_format] {
|
|||||||
return
|
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
|
run_dump_test overlay-size
|
||||||
|
|
||||||
|
set ASFLAGS "$saved_ASFLAGS"
|
||||||
|
Reference in New Issue
Block a user