diff options
author | Renlin Li <renlin.li@arm.com> | 2015-10-02 16:28:49 +0100 |
---|---|---|
committer | Renlin Li <renlin.li@arm.com> | 2015-10-02 17:56:08 +0100 |
commit | 3e8286c0d2f6f94fcbc38a2233d85b90ca4040c0 (patch) | |
tree | 5f73927b37506459f3dffa969ec394bdbf8700e5 /bfd | |
parent | 94facae3374655816798d1d505b447f81db4759d (diff) | |
download | fsf-binutils-gdb-3e8286c0d2f6f94fcbc38a2233d85b90ca4040c0.zip fsf-binutils-gdb-3e8286c0d2f6f94fcbc38a2233d85b90ca4040c0.tar.gz fsf-binutils-gdb-3e8286c0d2f6f94fcbc38a2233d85b90ca4040c0.tar.bz2 |
[GAS][AARCH64]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
bfd/
2015-10-02 Renlin Li <renlin.li@arm.com>
* reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
* libbfd.h: Regenerate.
* bfd-in2.h: Likewise
gas/
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.
(aarch64_force_relocation): Likewise.
gas/testsuite/
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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 3 | ||||
-rw-r--r-- | bfd/elfnn-aarch64.c | 16 | ||||
-rw-r--r-- | bfd/libbfd.h | 1 | ||||
-rw-r--r-- | bfd/reloc.c | 4 |
5 files changed, 32 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6fabefa..1b56c3d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,13 @@ 2015-10-02 Renlin Li <renlin.li@arm.com> + * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry. + * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC. + * libbfd.h: Regenerate. + * bfd-in2.h: Likewise + +2015-10-02 Renlin Li <renlin.li@arm.com> + * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support. (elfNN_aarch64_final_link_relocate): Likewise. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 39c1af2..036bbbb 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -5787,6 +5787,9 @@ BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. */ BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC, /* AArch64 TLS General Dynamic relocation. */ + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC, + +/* AArch64 TLS General Dynamic relocation. */ BFD_RELOC_AARCH64_TLSGD_MOVW_G1, /* AArch64 TLS INITIAL EXEC relocation. */ diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 7977588..519aa51 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -168,6 +168,7 @@ ((R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PREL21 \ + || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_MOVW_G1 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC \ @@ -1007,6 +1008,21 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 0xfff, /* dst_mask */ FALSE), /* pcrel_offset */ + /* Lower 16 bits of GOT offset to tls_index. */ + HOWTO64 (AARCH64_R (TLSGD_MOVW_G0_NC), /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + AARCH64_R_STR (TLSGD_MOVW_G0_NC), /* name */ + FALSE, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ + FALSE), /* pcrel_offset */ + /* Higher 16 bits of GOT offset to tls_index. */ HOWTO64 (AARCH64_R (TLSGD_MOVW_G1), /* type */ 16, /* rightshift */ diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 93bdc5d..3d3d586 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -2755,6 +2755,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21", "BFD_RELOC_AARCH64_TLSGD_ADR_PREL21", "BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC", + "BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC", "BFD_RELOC_AARCH64_TLSGD_MOVW_G1", "BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1", "BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC", diff --git a/bfd/reloc.c b/bfd/reloc.c index b32a2e2..a0801916 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -6830,6 +6830,10 @@ ENUMDOC tls_index structure. Used in conjunction with BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21. ENUM + BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC +ENUMDOC + AArch64 TLS General Dynamic relocation. +ENUM BFD_RELOC_AARCH64_TLSGD_MOVW_G1 ENUMDOC AArch64 TLS General Dynamic relocation. |