aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2015-10-02 16:59:46 +0100
committerRenlin Li <renlin.li@arm.com>2015-10-02 17:56:08 +0100
commit3b957e5b074407e18782a9592754c732671df8ed (patch)
tree4b5eea00b0e67b41989d29f6f1f41545b171a272 /gas
parent7ba7cfe43195305f5efa887ebbffb53a724aaac6 (diff)
downloadgdb-3b957e5b074407e18782a9592754c732671df8ed.zip
gdb-3b957e5b074407e18782a9592754c732671df8ed.tar.gz
gdb-3b957e5b074407e18782a9592754c732671df8ed.tar.bz2
[Binutils][AARCH64]Add TLS IE large memory support.
bfd/ 2015-10-02 Renlin Li <renlin.li@arm.com> * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make TLSIE_MOVW_GOTTPREL_G1 check overflow. (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1 and TLSIE_MOVW_GOTTPREL_G0_NC. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. gas/ 2015-10-02 Renlin Li <renlin.li@arm.com> * config/tc-aarch64.c (reloc_table): Add two entries for gottprel_g0_nc and gottprel_g1. (process_movw_reloc_info): Add support. (md_apply_fix): Likewise. (aarch64_force_relocation): Likewise. gas/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> * gas/aarch64/reloc-gottprel_g0_nc.d: New. * gas/aarch64/reloc-gottprel_g0_nc.s: New. * gas/aarch64/reloc-gottprel_g1.d: New. * gas/aarch64/reloc-gottprel_g1.s: New. ld/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> * ld-aarch64/tls-large-ie.d: New. * ld-aarch64/tls-large-ie.s: New. * ld-aarch64/aarch64-elf.exp: Run new test.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-aarch64.c26
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.s4
-rw-r--r--gas/testsuite/gas/aarch64/reloc-gottprel_g1.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-gottprel_g1.s4
7 files changed, 66 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5fc9cae..38175b1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,13 @@
2015-10-02 Renlin Li <renlin.li@arm.com>
+ * config/tc-aarch64.c (reloc_table): Add two entries for
+ gottprel_g0_nc and gottprel_g1.
+ (process_movw_reloc_info): Add support.
+ (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 tlsgd_g0_nc.
(process_movw_reloc_info): Support BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
(md_apply_fix): Likewise.
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index a13ba55..8d6f1f9 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -2483,6 +2483,24 @@ static struct reloc_table_entry reloc_table[] = {
0},
/* Get to the page containing GOT TLS entry for a symbol */
+ {"gottprel_g0_nc", 0,
+ 0, /* adr_type */
+ 0,
+ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC,
+ 0,
+ 0,
+ 0},
+
+ /* Get to the page containing GOT TLS entry for a symbol */
+ {"gottprel_g1", 0,
+ 0, /* adr_type */
+ 0,
+ BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1,
+ 0,
+ 0,
+ 0},
+
+ /* Get to the page containing GOT TLS entry for a symbol */
{"tlsgd", 0,
BFD_RELOC_AARCH64_TLSGD_ADR_PREL21, /* adr_type */
BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21,
@@ -4706,6 +4724,7 @@ process_movw_reloc_info (void)
case BFD_RELOC_AARCH64_MOVW_G0_S:
case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC:
+ case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0:
case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
@@ -4717,6 +4736,7 @@ process_movw_reloc_info (void)
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_TLSIE_MOVW_GOTTPREL_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:
@@ -6942,6 +6962,8 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
+ case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+ case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12:
case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12:
case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC:
@@ -7172,7 +7194,9 @@ aarch64_force_relocation (struct fix *fixp)
case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC:
case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC:
case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
- case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12:
+ case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC:
+ case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1:
+ case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12:
case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12:
case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC:
case BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC:
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index cbc37a8..ce49c44 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2015-10-02 Renlin Li <renlin.li@arm.com>
+ * gas/aarch64/reloc-gottprel_g0_nc.d: New.
+ * gas/aarch64/reloc-gottprel_g0_nc.s: New.
+ * gas/aarch64/reloc-gottprel_g1.d: New.
+ * gas/aarch64/reloc-gottprel_g1.s: New.
+
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
* gas/aarch64/reloc-tlsgd_g0_nc.d: New.
* gas/aarch64/reloc-tlsgd_g0_nc.s: New.
diff --git a/gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.d b/gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.d
new file mode 100644
index 0000000..07c78c3
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: f280001c movk x28, #0x0
+ 0: R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC x
diff --git a/gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.s b/gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.s
new file mode 100644
index 0000000..c8178ff
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-gottprel_g0_nc.s
@@ -0,0 +1,4 @@
+// Test file for AArch64 GAS -- gottprel_g0_nc
+
+func:
+ movk x28, #:gottprel_g0_nc:x
diff --git a/gas/testsuite/gas/aarch64/reloc-gottprel_g1.d b/gas/testsuite/gas/aarch64/reloc-gottprel_g1.d
new file mode 100644
index 0000000..4da88cf
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-gottprel_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_TLSIE_MOVW_GOTTPREL_G1 x
diff --git a/gas/testsuite/gas/aarch64/reloc-gottprel_g1.s b/gas/testsuite/gas/aarch64/reloc-gottprel_g1.s
new file mode 100644
index 0000000..64491f7
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-gottprel_g1.s
@@ -0,0 +1,4 @@
+// Test file for AArch64 GAS -- gottprel_g1
+
+func:
+ movz x28, #:gottprel_g1:x