diff options
author | Jiong Wang <jiong.wang@arm.com> | 2015-08-19 10:58:13 +0100 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2015-08-19 16:30:47 +0100 |
commit | 753999c1ec8fa76bd5ed5509d1e5909d010e80ee (patch) | |
tree | 488d2280cb2a0ab764ecba171cddb56318aa31f6 /bfd | |
parent | 13289c10e20281adf480d9822861412a7ade721d (diff) | |
download | gdb-753999c1ec8fa76bd5ed5509d1e5909d010e80ee.zip gdb-753999c1ec8fa76bd5ed5509d1e5909d010e80ee.tar.gz gdb-753999c1ec8fa76bd5ed5509d1e5909d010e80ee.tar.bz2 |
[AArch64][2/6] LD support BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
2015-08-19 Jiong Wang <jiong.wang@arm.com>
bfd/
* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
(aarch64_reloc_got_type): Likewise.
(elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise.
ld/testsuite/
* ld-aarch64/emit-relocs-530.s: New testcase.
* ld-aarch64/emit-relocs-92.s: Likewise.
* ld-aarch64/emit-relocs-530.d: New expectation file.
* ld-aarch64/emit-relocs-92.d: Likewise.
* ld-aarch64/aarch64-elf.exp: Run new testcases.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 10 | ||||
-rw-r--r-- | bfd/elfnn-aarch64.c | 2 | ||||
-rw-r--r-- | bfd/elfxx-aarch64.c | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 772336f..a6491e1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,15 @@ 2015-08-19 Jiong Wang <jiong.wang@arm.com> + * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize + BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC. + (aarch64_reloc_got_type): Likewise. + (elfNN_aarch64_final_link_relocate): Likewise. + (elfNN_aarch64_relocate_section): Likewise. + * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. + (_bfd_aarch64_elf_resolve_relocation): Likewise. + +2015-08-19 Jiong Wang <jiong.wang@arm.com> + * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 9277261..962a10e 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -175,6 +175,7 @@ || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12 \ + || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21 \ || (R_TYPE) == BFD_RELOC_AARCH64_TLSLD_ADR_PREL21 \ @@ -5093,6 +5094,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, break; case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12: + case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC: value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value, signed_addend - dtpoff_base (info), weak_undef_p); diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 69dac6d..dbb134a 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -250,6 +250,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd, case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: 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: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: @@ -400,6 +401,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd_reloc_code_real_type r_type, case BFD_RELOC_AARCH64_MOVW_G2_S: case BFD_RELOC_AARCH64_MOVW_G3: case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12: + case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC: value = value + addend; break; |