Adding support for TLSIE_LD_GOTTREL_PREL19.
This commit is contained in:
parent
74ad790c76
commit
043bf05a3d
|
@ -1,3 +1,15 @@
|
|||
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.
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2015-02-19 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
||||
|
||||
* config/tc-aarch64.c (reloc_table_entry): Generate
|
||||
BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
|
||||
(md_apply_fix, aarch64_force_relocation): Handle
|
||||
BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
|
||||
|
||||
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
|
||||
|
||||
* config/tc-aarch64.c (reloc_table_entry): Add ld_literal_type.
|
||||
|
|
|
@ -2497,7 +2497,7 @@ static struct reloc_table_entry reloc_table[] = {
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0},
|
||||
BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19},
|
||||
|
||||
/* 12 bit offset into the page containing GOT TLS entry for a symbol */
|
||||
{"gottprel_lo12", 0,
|
||||
|
@ -6715,6 +6715,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
|
|||
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:
|
||||
|
@ -6914,6 +6915,7 @@ aarch64_force_relocation (struct fix *fixp)
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue