This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_25-branch] [AArch64][GAS] Backport "Positively emit symbols for alignment"
- From: Jiong Wang <jiwang at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 18 Jun 2015 11:33:43 -0000
- Subject: [binutils-gdb/binutils-2_25-branch] [AArch64][GAS] Backport "Positively emit symbols for alignment"
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a70a60181615087e1bd97770bf256bdeebceab4f
commit a70a60181615087e1bd97770bf256bdeebceab4f
Author: Jiong Wang <jiong.wang@arm.com>
Date: Thu Jun 18 12:32:19 2015 +0100
[AArch64][GAS] Backport "Positively emit symbols for alignment"
2015-06-17 Renlin Li <renlin.li@arm.com>
Applied from master.
2015-05-05 Renlin Li <renlin.li@arm.com>
gas/
* config/tc-aarch64.c (aarch64_init_frag): Always generate mapping
symbols.
gas/testsuite/
* gas/aarch64/mapping_5.d: New.
* gas/aarch64/mapping_5.s: New.
* gas/aarch64/mapping_6.d: New.
* gas/aarch64/mapping_6.s: New.
Diff:
---
gas/ChangeLog | 8 ++++++++
gas/config/tc-aarch64.c | 27 +++++++++++++--------------
gas/testsuite/ChangeLog | 10 ++++++++++
gas/testsuite/gas/aarch64/mapping_5.d | 14 ++++++++++++++
gas/testsuite/gas/aarch64/mapping_5.s | 5 +++++
gas/testsuite/gas/aarch64/mapping_6.d | 15 +++++++++++++++
gas/testsuite/gas/aarch64/mapping_6.s | 6 ++++++
7 files changed, 71 insertions(+), 14 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1195d98..7b947cd 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2015-06-17 Renlin Li <renlin.li@arm.com>
+
+ Applied from master.
+ 2015-05-05 Renlin Li <renlin.li@arm.com>
+
+ * config/tc-aarch64.c (aarch64_init_frag): Always generate mapping
+ symbols.
+
2015-06-04 Matthew Wahab <matthew.wahab@arm.com>
* config/tc-aarch64.c (mapping_state): Set minimum alignment for code
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 10b1b74..2a94fe0 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -5921,21 +5921,20 @@ aarch64_init_frag (fragS * fragP, int max_chars)
/* Record a mapping symbol for alignment frags. We will delete this
later if the alignment ends up empty. */
if (!fragP->tc_frag_data.recorded)
+ fragP->tc_frag_data.recorded = 1;
+
+ switch (fragP->fr_type)
{
- fragP->tc_frag_data.recorded = 1;
- switch (fragP->fr_type)
- {
- case rs_align:
- case rs_align_test:
- case rs_fill:
- mapping_state_2 (MAP_DATA, max_chars);
- break;
- case rs_align_code:
- mapping_state_2 (MAP_INSN, max_chars);
- break;
- default:
- break;
- }
+ case rs_align:
+ case rs_align_test:
+ case rs_fill:
+ mapping_state_2 (MAP_DATA, max_chars);
+ break;
+ case rs_align_code:
+ mapping_state_2 (MAP_INSN, max_chars);
+ break;
+ default:
+ break;
}
}
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index bc581b9..e5a946c 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2015-06-17 Renlin Li <renlin.li@arm.com>
+
+ Applied from master.
+ 2015-05-05 Renlin Li <renlin.li@arm.com>
+
+ * gas/aarch64/mapping_5.d: New.
+ * gas/aarch64/mapping_5.s: New.
+ * gas/aarch64/mapping_6.d: New.
+ * gas/aarch64/mapping_6.s: New.
+
2015-06-16 Matthew Wahab <matthew.wahab@arm.com>
Applied from master.
diff --git a/gas/testsuite/gas/aarch64/mapping_5.d b/gas/testsuite/gas/aarch64/mapping_5.d
new file mode 100644
index 0000000..8a85038
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/mapping_5.d
@@ -0,0 +1,14 @@
+#objdump: --syms --special-syms
+#name: AArch64 Mapping Symbols Test 5
+
+.*: +file format.*aarch64.*
+
+SYMBOL TABLE:
+[0]+00 l d .text [0]+00 .text
+[0]+00 l d .data [0]+00 .data
+[0]+00 l d .bss [0]+00 .bss
+[0]+00 l .text [0]+00 \$x
+[0]+04 l .text [0]+00 \$d
+[0]+08 l .text [0]+00 \$x
+[0]+10 l .text [0]+00 \$d
+[0]+14 l .text [0]+00 \$x
diff --git a/gas/testsuite/gas/aarch64/mapping_5.s b/gas/testsuite/gas/aarch64/mapping_5.s
new file mode 100644
index 0000000..2cb95ed
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/mapping_5.s
@@ -0,0 +1,5 @@
+ .text
+ nop
+ .long 0
+ .align 4
+ .word 0x12345678
diff --git a/gas/testsuite/gas/aarch64/mapping_6.d b/gas/testsuite/gas/aarch64/mapping_6.d
new file mode 100644
index 0000000..df6bdaa
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/mapping_6.d
@@ -0,0 +1,15 @@
+#objdump: --syms --special-syms
+#name: AArch64 Mapping Symbols Test 6
+
+.*: +file format.*aarch64.*
+
+SYMBOL TABLE:
+[0]+00 l d .text [0]+00 .text
+[0]+00 l d .data [0]+00 .data
+[0]+00 l d .bss [0]+00 .bss
+[0]+00 l .text [0]+00 \$x
+[0]+04 l .text [0]+00 \$d
+[0]+10 l .text [0]+00 \$d
+[0]+14 l .text [0]+00 \$x
+[0]+09 l .text [0]+00 \$d
+[0]+0c l .text [0]+00 \$x
diff --git a/gas/testsuite/gas/aarch64/mapping_6.s b/gas/testsuite/gas/aarch64/mapping_6.s
new file mode 100644
index 0000000..4e0e2c5
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/mapping_6.s
@@ -0,0 +1,6 @@
+ .text
+ nop
+ .long 0
+ .byte 1
+ .align 4
+ .word 0x12345678