[AArch64]Speed up linking speed by skipping unncessary TLS reloc type check
2015-08-11 Jiong Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New. (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
This commit is contained in:
parent
f678ded748
commit
9331eea1f8
|
@ -1,3 +1,8 @@
|
|||
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".
|
||||
|
|
|
@ -191,6 +191,20 @@
|
|||
|| (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 \
|
||||
|
@ -4206,7 +4220,7 @@ aarch64_can_relax_tls (bfd *input_bfd,
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue