aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog12
-rw-r--r--bfd/elfnn-aarch64.c17
-rw-r--r--bfd/elfxx-aarch64.c2
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-aarch64.c4
5 files changed, 40 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3132320..0103df2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,17 @@
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
+ * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC) BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21 move.
+ (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_TLSDESC_ADR_PREL21.
+ * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
+ (_bfd_aarch64_elf_resolve_relocation): Likewise.
+ * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
+
+2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
(elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 1ff1865..ee88b5d 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -189,8 +189,8 @@
#define IS_AARCH64_TLSDESC_RELOC(R_TYPE) \
((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD_PREL19 \
- || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21 \
|| (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21 \
|| (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC \
|| (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC \
|| (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC \
@@ -3750,6 +3750,11 @@ aarch64_tls_transition_without_check (bfd_reloc_code_real_type r_type,
? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1
: BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21);
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
+ return (is_local
+ ? BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC
+ : r_type);
+
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC:
return (is_local
@@ -3800,6 +3805,7 @@ aarch64_reloc_got_type (bfd_reloc_code_real_type r_type)
case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSDESC_CALL:
case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
@@ -4545,6 +4551,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
case BFD_RELOC_AARCH64_TLSDESC_ADD:
case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LDR:
@@ -4618,6 +4625,11 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
return bfd_reloc_continue;
}
+
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
+ BFD_ASSERT (0);
+ break;
+
case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
if (is_local)
{
@@ -5092,6 +5104,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC:
if (! symbol_tlsdesc_got_offset_mark_p (input_bfd, h, r_symndx))
{
@@ -5460,6 +5473,7 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd,
case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
@@ -5930,6 +5944,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c
index b5a9334..929eb64 100644
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -252,6 +252,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
case BFD_RELOC_AARCH64_TLSDESC_CALL:
break;
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:
case BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
@@ -378,6 +379,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd_reloc_code_real_type r_type,
case BFD_RELOC_AARCH64_NONE:
break;
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19:
case BFD_RELOC_AARCH64_ADR_LO21_PCREL:
diff --git a/gas/ChangeLog b/gas/ChangeLog
index b4eadfb..a769877 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,6 +1,13 @@
2015-02-19 Marcus Shawcroft <marcus.shawcroft@arm.com>
* config/tc-aarch64.c (reloc_table_entry): Generate
+ BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
+ (md_apply_fix, aarch64_force_relocation): Handle
+ BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
+
+2015-02-19 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * config/tc-aarch64.c (reloc_table_entry): Generate
BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
(md_apply_fix, aarch64_force_relocation): Handle
BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index bcd6f4f..ce56dc3 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -2474,7 +2474,7 @@ static struct reloc_table_entry reloc_table[] = {
/* Get to the page containing GOT TLS entry for a symbol */
{"tlsdesc", 0,
- 0, /* adr_type */
+ BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21, /* adr_type */
BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21,
0,
0,
@@ -6708,6 +6708,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
@@ -6909,6 +6910,7 @@ aarch64_force_relocation (struct fix *fixp)
case BFD_RELOC_AARCH64_LDST8_LO12:
case BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:
+ case BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:
case BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC:
case BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC:
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC: