This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [AArch64]Speed up linking speed by skipping unncessary TLS reloc type check


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9331eea1f83b94c6f5a72ebf643aa8978a0b0a13

commit 9331eea1f83b94c6f5a72ebf643aa8978a0b0a13
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 22:05:39 2015 +0100

    [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.

Diff:
---
 bfd/ChangeLog       |  5 +++++
 bfd/elfnn-aarch64.c | 16 +++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]