aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2015-10-02 16:04:09 +0100
committerRenlin Li <renlin.li@arm.com>2015-10-02 17:56:08 +0100
commit1aa66fb1527c3c81fef2a39a3a3ec9d36f1cfdec (patch)
tree08f4d2216e85d54672dc0448f7d37467603fe903 /gas
parentdc8008f508bb39ccbca49ea71a7d5c70571c4685 (diff)
downloadgdb-1aa66fb1527c3c81fef2a39a3a3ec9d36f1cfdec.zip
gdb-1aa66fb1527c3c81fef2a39a3a3ec9d36f1cfdec.tar.gz
gdb-1aa66fb1527c3c81fef2a39a3a3ec9d36f1cfdec.tar.bz2
[GAS][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
bfd/ 2015-10-02 Renlin Li <renlin.li@arm.com> * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSGD_MOVW_G1. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. gas/ 2015-10-02 Renlin Li <renlin.li@arm.com> * config/tc-aarch64.c (reloc_table): New relocation modifier tlsgd_g1. (process_movw_reloc_info): Support BFD_RELOC_AARCH64_TLSGD_MOVW_G1. (md_apply_fix): Likewise. (aarch64_force_relocation): Likewise. gas/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> * gas/aarch64/reloc-tlsgd_g1.s: New. * gas/aarch64/reloc-tlsgd_g1.s: New.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-aarch64.c13
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-tlsgd_g1.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-tlsgd_g1.s4
5 files changed, 38 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 63b9805..8d0908f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2015-10-02 Renlin Li <renlin.li@arm.com>
+ * config/tc-aarch64.c (reloc_table): New relocation modifier tlsgd_g1.
+ (process_movw_reloc_info): Support BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
+ (md_apply_fix): Likewise.
+ (aarch64_force_relocation): Likewise.
+
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
* config/tc-aarch64.c (reloc_table): New relocation modifier
gotoff_g0_nc.
(process_movw_reloc_info): Support gotoff_g0_nc.
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 1b62b39..5716ef0 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -2500,6 +2500,15 @@ static struct reloc_table_entry reloc_table[] = {
0,
0},
+ /* Most significant bits 16-31 of address/value: MOVZ. */
+ {"tlsgd_g1", 0,
+ 0, /* adr_type */
+ 0,
+ BFD_RELOC_AARCH64_TLSGD_MOVW_G1,
+ 0,
+ 0,
+ 0},
+
/* Get to the page containing GOT TLS entry for a symbol */
{"tlsdesc", 0,
BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, /* adr_type */
@@ -4670,6 +4679,7 @@ process_movw_reloc_info (void)
case BFD_RELOC_AARCH64_MOVW_G0_S:
case BFD_RELOC_AARCH64_MOVW_G1_S:
case BFD_RELOC_AARCH64_MOVW_G2_S:
+ case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2:
@@ -4696,6 +4706,7 @@ process_movw_reloc_info (void)
case BFD_RELOC_AARCH64_MOVW_G1_NC:
case BFD_RELOC_AARCH64_MOVW_G1_S:
case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
+ case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1:
case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1:
@@ -6915,6 +6926,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
+ case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
@@ -7143,6 +7155,7 @@ aarch64_force_relocation (struct fix *fixp)
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
+ case BFD_RELOC_AARCH64_TLSGD_MOVW_G1:
case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 585d354..cf9e0da 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2015-10-02 Renlin Li <renlin.li@arm.com>
+ * gas/aarch64/reloc-tlsgd_g1.s: New.
+ * gas/aarch64/reloc-tlsgd_g1.s: New.
+
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
* gas/aarch64/reloc-gotoff_g0_nc.s: New.
* gas/aarch64/reloc-gotoff_g0_nc.d: New.
diff --git a/gas/testsuite/gas/aarch64/reloc-tlsgd_g1.d b/gas/testsuite/gas/aarch64/reloc-tlsgd_g1.d
new file mode 100644
index 0000000..7063f4e
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-tlsgd_g1.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: d2a0001c movz x28, #0x0, lsl #16
+ 0: R_AARCH64_TLSGD_MOVW_G1 var
diff --git a/gas/testsuite/gas/aarch64/reloc-tlsgd_g1.s b/gas/testsuite/gas/aarch64/reloc-tlsgd_g1.s
new file mode 100644
index 0000000..12f73cd
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-tlsgd_g1.s
@@ -0,0 +1,4 @@
+func:
+
+ // R_AARCH64_TLSGD_MOVW_G1 var
+ movz x28, #:tlsgd_g1:var