This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
V2 [PATCH 3/7] binutils: Adjusted tests for .note.gnu.property section
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 28 Aug 2018 08:22:57 -0700
- Subject: V2 [PATCH 3/7] binutils: Adjusted tests for .note.gnu.property section
- References: <20180828152301.5360-1-hjl.tools@gmail.com>
Since x86 assembler may generate .note.gnu.property section, adjust
binutils tests to handle it.
* testsuite/binutils-all/readelf.s-64: Adjusted for
.note.gnu.property section.
* testsuite/binutils-all/strip-3.d: Also strip
.note.gnu.property section.
---
binutils/testsuite/binutils-all/readelf.s-64 | 11 +++++++----
binutils/testsuite/binutils-all/strip-3.d | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/binutils/testsuite/binutils-all/readelf.s-64 b/binutils/testsuite/binutils-all/readelf.s-64
index 622b314503..a1e6cd1bbd 100644
--- a/binutils/testsuite/binutils-all/readelf.s-64
+++ b/binutils/testsuite/binutils-all/readelf.s-64
@@ -13,12 +13,15 @@ Section Headers:
+000000000000000[48] +0000000000000000 +WA +0 +0 +.*
+\[ 4\] .bss +NOBITS +0000000000000000 +000000(4c|50|54|58)
+0000000000000000 +0000000000000000 +WA +0 +0 +.*
- +\[ 5\] .symtab +SYMTAB +0000000000000000 +0+.*
+# x86 targets may put .note.gnu.property here.
+#...
+ +\[ .\] .symtab +SYMTAB +0000000000000000 +0+.*
# aarch64-elf targets have one more data symbol.
- +0+.* +0000000000000018 +6 +(6|7) +8
- +\[ 6\] .strtab +STRTAB +0000000000000000 +0+.*
+# x86 targets may have .note.gnu.property.
+ +0+.* +0000000000000018 +(6|7) +(6|7) +8
+ +\[ .\] .strtab +STRTAB +0000000000000000 +0+.*
+0+.* +0000000000000000 .* +0 +0 +1
- +\[ 7\] .shstrtab +STRTAB +0000000000000000 +[0-9a-f]+
+ +\[ .\] .shstrtab +STRTAB +0000000000000000 +[0-9a-f]+
+00000000000000.. +0000000000000000 .* +0 +0 +.*
Key to Flags:
#...
diff --git a/binutils/testsuite/binutils-all/strip-3.d b/binutils/testsuite/binutils-all/strip-3.d
index 190298c99d..8a375d81dc 100644
--- a/binutils/testsuite/binutils-all/strip-3.d
+++ b/binutils/testsuite/binutils-all/strip-3.d
@@ -1,6 +1,6 @@
#PROG: strip
#source: empty.s
-#strip: -R .text -R .data -R .bss -R .ARM.attributes -R .reginfo -R .gnu.attributes -R .MIPS.abiflags -R .pdr -R .xtensa.info -R .ARC.attributes
+#strip: -R .text -R .data -R .bss -R .ARM.attributes -R .reginfo -R .gnu.attributes -R .MIPS.abiflags -R .pdr -R .xtensa.info -R .ARC.attributes -R .note.gnu.property
#readelf: -S --wide
#name: strip empty file
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
--
2.17.1