+2015-08-11 Jiong Wang <jiong.wang@arm.com>
+
+ * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
+ (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
+
2015-08-11 Jiong Wang <jiong.wang@arm.com>
* bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
|| (R_TYPE) == BFD_RELOC_AARCH64_TLS_TPREL \
|| IS_AARCH64_TLSDESC_RELOC ((R_TYPE)))
+#define IS_AARCH64_TLS_RELAX_RELOC(R_TYPE) \
+ ((R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADR_PREL21 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSIE_LDNN_GOTTPREL_LO12_NC \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LD_PREL19 \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_LDNN_LO12_NC \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_CALL \
+ || (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC)
+
#define IS_AARCH64_TLSDESC_RELOC(R_TYPE) \
((R_TYPE) == BFD_RELOC_AARCH64_TLSDESC \
|| (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_ADD \
unsigned int symbol_got_type;
unsigned int reloc_got_type;
- if (! IS_AARCH64_TLS_RELOC (r_type))
+ if (! IS_AARCH64_TLS_RELAX_RELOC (r_type))
return FALSE;
symbol_got_type = elfNN_aarch64_symbol_got_type (h, input_bfd, r_symndx);