diff options
author | Marcus Shawcroft <marcus.shawcroft@arm.com> | 2015-02-13 09:57:11 +0000 |
---|---|---|
committer | Marcus Shawcroft <marcus.shawcroft@arm.com> | 2015-02-26 22:23:09 +0000 |
commit | 043bf05a3d8e4bf7706f7c038540b893ec075051 (patch) | |
tree | f5316dd4a882f9a43557b0d398e84841f51aaca3 /bfd | |
parent | 74ad790c76cf890fc7f42d6dd5a4cebfde5cc0db (diff) | |
download | gdb-043bf05a3d8e4bf7706f7c038540b893ec075051.zip gdb-043bf05a3d8e4bf7706f7c038540b893ec075051.tar.gz gdb-043bf05a3d8e4bf7706f7c038540b893ec075051.tar.bz2 |
Adding support for TLSIE_LD_GOTTREL_PREL19.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 12 | ||||
-rw-r--r-- | bfd/elfnn-aarch64.c | 13 | ||||
-rw-r--r-- | bfd/elfxx-aarch64.c | 2 |
3 files changed, 26 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3b7aff8..4d347f4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,17 @@ 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com> + * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width. + (aarch64_tls_transition_without_check, aarch64_reloc_got_type) + (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax) + (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook) + (elfNN_aarch64_check_relocs): Handle + BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19. + + * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) + (_bfd_aarch64_elf_resolve_relocation): Likewise. + +2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com> + * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width. 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com> diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index b863244..3d9c383 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -951,7 +951,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = HOWTO (AARCH64_R (TLSIE_LD_GOTTPREL_PREL19), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ - 21, /* bitsize */ + 19, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ @@ -3747,6 +3747,9 @@ aarch64_tls_transition_without_check (bfd_reloc_code_real_type r_type, case BFD_RELOC_AARCH64_TLSIE_LDNN_GOTTPREL_LO12_NC: return is_local ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC : r_type; + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: + return r_type; + case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: case BFD_RELOC_AARCH64_TLSDESC_CALL: /* Instructions with these relocations will become NOPs. */ @@ -3784,6 +3787,7 @@ aarch64_reloc_got_type (bfd_reloc_code_real_type r_type) case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: return GOT_TLS_IE; case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: @@ -4489,6 +4493,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: case BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: case BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: if (globals->root.sgot == NULL) return bfd_reloc_notsupported; @@ -4591,6 +4596,9 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals, return bfd_reloc_continue; } + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: + return bfd_reloc_continue; + case BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC: if (is_local) { @@ -4954,6 +4962,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: case BFD_RELOC_AARCH64_TLSIE_LDNN_GOTTPREL_LO12_NC: + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: if (! symbol_got_offset_mark_p (input_bfd, h, r_symndx)) { bfd_boolean need_relocs = FALSE; @@ -5390,6 +5399,7 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd, 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: + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: @@ -5858,6 +5868,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, 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: + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: case BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 66c03e3..328743d 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -243,6 +243,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd, case BFD_RELOC_AARCH64_LD_LO19_PCREL: case BFD_RELOC_AARCH64_GOT_LD_PREL19: + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: if (old_addend & ((1 << howto->rightshift) - 1)) return bfd_reloc_overflow; contents = reencode_ld_lit_ofs_19 (contents, addend); @@ -376,6 +377,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd_reloc_code_real_type r_type, case BFD_RELOC_AARCH64_NONE: break; + case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: case BFD_RELOC_AARCH64_ADR_LO21_PCREL: case BFD_RELOC_AARCH64_BRANCH19: case BFD_RELOC_AARCH64_LD_LO19_PCREL: |