This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH][AARCH64]Fix bintest.s failure after "Fix align directive causes MAP_DATA symbol to be lost" change
- From: Renlin Li <renlin dot li at arm dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, "nickc at redhat dot com" <nickc at redhat dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Thu, 26 Mar 2015 17:31:42 +0000
- Subject: [PATCH][AARCH64]Fix bintest.s failure after "Fix align directive causes MAP_DATA symbol to be lost" change
- Authentication-results: sourceware.org; auth=none
- References: <5511A0E4 dot 8020802 at arm dot com> <5512A987 dot 2000404 at redhat dot com> <CAFqB+Pz97Ysuz==AbbLn5jNPnTb1CPxFZX0-b-AQDzWkdbJD-A at mail dot gmail dot com> <5513E76A dot 4090808 at arm dot com>
Hi,
This patch adjusts bintest.s test case according to the MAP_DATA symbols
change made recently.
https://sourceware.org/ml/binutils/2015-03/msg00331.html
After the change, we emit MAP_DATA symbols even there is no instruction
in .text section.
So we have got one more data symbol for bintest.s test case.
The fix is similar to the method used for arm. The desired output is adjust.
Binutils regression test runs Okay. Okay to commit?
Regards,
Renlin Li
binutils/testsuite/ChangeLog:
2015-03-26 Renlin Li <renlin.li@arm.com>
* binutils-all/readelf.s-64: Support aarch64 case.
* binutils-all/readelf.ss-64: Likewise.
On 26/03/15 11:03, Renlin Li wrote:
Hi Marcus,
After the change, we emit MAP_DATA symbols even there is no instruction
in .text section.
So we have got one more data symbol for bintest.s test case.
I will double check and find a solution.
Regards,
Renlin
On 26/03/15 09:29, Marcus Shawcroft wrote:
On 25 March 2015 at 12:26, Nicholas Clifton <nickc@redhat.com
<mailto:nickc@redhat.com>> wrote:
Hi Renlin,
gas/ChangeLog:
2015-03-24 Renlin Li <renlin.li@arm.com
<mailto:renlin.li@arm.com>>
* config/tc-aarch64.c (mapping_state): Remove first MAP_DATA
emitting code.
(mapping_state_2): Emit first MAP_DATA symbol here.
Approved - please apply.
Cheers
Nick
This patch appears to causes the following two regressions for
aarch64-none-linux-gnu:
FAIL: readelf -S
FAIL: readelf -s
Cheers
/Marcus
diff --git a/binutils/testsuite/binutils-all/readelf.s-64 b/binutils/testsuite/binutils-all/readelf.s-64
index 2e05d68..acebab9 100644
--- a/binutils/testsuite/binutils-all/readelf.s-64
+++ b/binutils/testsuite/binutils-all/readelf.s-64
@@ -16,7 +16,8 @@ Section Headers:
+\[ 5\] .shstrtab +STRTAB +0000000000000000 +000000(4c|50|54|58)
+00000000000000.. +0000000000000000 +0 +0 +.*
+\[ 6\] .symtab +SYMTAB +0000000000000000 +0+.*
- +0+.* +0000000000000018 +7 +6 +8
+# aarch64-elf targets have one more data symbol.
+ +0+.* +0000000000000018 +7 +(6|7) +8
+\[ 7\] .strtab +STRTAB +0000000000000000 +0+.*
+0+.* +0000000000000000 +0 +0 +1
Key to Flags:
diff --git a/binutils/testsuite/binutils-all/readelf.ss-64 b/binutils/testsuite/binutils-all/readelf.ss-64
index c100c14..4372591 100644
--- a/binutils/testsuite/binutils-all/readelf.ss-64
+++ b/binutils/testsuite/binutils-all/readelf.ss-64
@@ -6,8 +6,10 @@ Symbol table '.symtab' contains .* entries:
+2: 0000000000000000 +0 +SECTION +LOCAL +DEFAULT +3
+3: 0000000000000000 +0 +SECTION +LOCAL +DEFAULT +4
+4: 0000000000000000 +0 +NOTYPE +LOCAL +DEFAULT +1 static_text_symbol
- +5: 0000000000000000 +0 +NOTYPE +LOCAL +DEFAULT +3 static_data_symbol
+# aarch64-elf targets add the $d mapping symbol here...
+#...
+ +.: 0000000000000000 +0 +NOTYPE +LOCAL +DEFAULT +3 static_data_symbol
.* +.: 0000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +1 text_symbol
+.: 0000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND external_symbol
+.: 0000000000000000 +0 +NOTYPE +GLOBAL +DEFAULT +3 data_symbol
- +.: 0000000000000004 +4 +(COMMON|OBJECT) +GLOBAL +DEFAULT +COM common_symbol
+ +[0-9]+: 0000000000000004 +4 +(COMMON|OBJECT) +GLOBAL +DEFAULT +COM common_symbol