This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] ld: Append -mx86-used-note=no to ASFLAGS


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e9d644e8fb2e7fa2f61e4b978f75881d906e0dbc

commit e9d644e8fb2e7fa2f61e4b978f75881d906e0dbc
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Aug 31 04:47:41 2018 -0700

    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

Diff:
---
 ld/ChangeLog                             | 8 ++++++++
 ld/testsuite/ld-elf/elf.exp              | 8 ++++++++
 ld/testsuite/ld-ifunc/ifunc.exp          | 8 ++++++++
 ld/testsuite/ld-scripts/defined.exp      | 8 ++++++++
 ld/testsuite/ld-scripts/overlay-size.exp | 9 +++++++++
 5 files changed, 41 insertions(+)

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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]