aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2016-05-11 11:55:02 +0100
committerJiong Wang <jiong.wang@arm.com>2016-05-11 11:55:02 +0100
commit4e7fbb34f0546360e86b56dcd32b4d6478662b41 (patch)
treee90e22ec7887c652dcfc53108d3cb717c2229ed7
parent4179a6a209f22354a605413e0de9ac10331c108b (diff)
downloadgdb-4e7fbb34f0546360e86b56dcd32b4d6478662b41.zip
gdb-4e7fbb34f0546360e86b56dcd32b4d6478662b41.tar.gz
gdb-4e7fbb34f0546360e86b56dcd32b4d6478662b41.tar.bz2
[AArch64] Remove redundant tls relax in elfNN_aarch64_final_link_relocate
bfd/ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant aarch64_tls_transition check.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfnn-aarch64.c16
2 files changed, 8 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f8ee48c..f2b9f6e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-10 Jiong Wang <jiong.wang@arm.com>
+
+ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
+ aarch64_tls_transition check.
+
2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
* elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index eecbf87..81bb011 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -4895,7 +4895,9 @@ elfNN_aarch64_write_section (bfd *output_bfd ATTRIBUTE_UNUSED,
return FALSE;
}
-/* Perform a relocation as part of a final link. */
+/* Perform a relocation as part of a final link. The input relocation type
+ should be TLS relaxed. */
+
static bfd_reloc_status_type
elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
bfd *input_bfd,
@@ -4916,7 +4918,6 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
unsigned int r_type = howto->type;
bfd_reloc_code_real_type bfd_r_type
= elfNN_aarch64_bfd_reloc_from_howto (howto);
- bfd_reloc_code_real_type new_bfd_r_type;
unsigned long r_symndx;
bfd_byte *hit_data = contents + rel->r_offset;
bfd_vma place, off;
@@ -4933,17 +4934,6 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
r_symndx = ELFNN_R_SYM (rel->r_info);
- /* It is possible to have linker relaxations on some TLS access
- models. Update our information here. */
- new_bfd_r_type = aarch64_tls_transition (input_bfd, info, r_type, h, r_symndx);
- if (new_bfd_r_type != bfd_r_type)
- {
- bfd_r_type = new_bfd_r_type;
- howto = elfNN_aarch64_howto_from_bfd_reloc (bfd_r_type);
- BFD_ASSERT (howto != NULL);
- r_type = howto->type;
- }
-
place = input_section->output_section->vma
+ input_section->output_offset + rel->r_offset;