diff options
author | Jiong Wang <jiong.wang@arm.com> | 2015-08-11 22:05:39 +0100 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2015-08-11 22:05:39 +0100 |
commit | 9331eea1f83b94c6f5a72ebf643aa8978a0b0a13 (patch) | |
tree | 8cc59db94f26f0ad2bee2dd709f2dd85ef7767d3 | |
parent | f678ded748f994a16e27fc3ac1d1c9451b98f608 (diff) | |
download | gdb-9331eea1f83b94c6f5a72ebf643aa8978a0b0a13.zip gdb-9331eea1f83b94c6f5a72ebf643aa8978a0b0a13.tar.gz gdb-9331eea1f83b94c6f5a72ebf643aa8978a0b0a13.tar.bz2 |
[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.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfnn-aarch64.c | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f4acd03..4b70d83 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 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". Loose the check for symbol from ABS section. (elfNN_aarch64_size_stubs): Pass sym_sec. diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 37fe1a6..1796ecd 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -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); |