|
Kyle McMartin |
404956d |
commit f44a1f8e513b37bcc52ba9ea0c172c3e94852756
|
|
Kyle McMartin |
404956d |
Author: Christophe Lyon <christophe.lyon@st.com>
|
|
Kyle McMartin |
404956d |
Date: Tue Jan 14 15:53:50 2014 +0100
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
|
|
Kyle McMartin |
404956d |
Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
bfd/
|
|
Kyle McMartin |
404956d |
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
|
|
Kyle McMartin |
404956d |
offset while calculating relocation address.
|
|
Kyle McMartin |
404956d |
(elfNN_aarch64_create_small_pltn_entry): Likewise.
|
|
Kyle McMartin |
404956d |
(elfNN_aarch64_init_small_plt0_entry): Likewise.
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
--- a/bfd/elfnn-aarch64.c
|
|
Kyle McMartin |
404956d |
+++ b/bfd/elfnn-aarch64.c
|
|
Kyle McMartin |
404956d |
@@ -3844,7 +3844,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
value = (symbol_got_offset (input_bfd, h, r_symndx)
|
|
Kyle McMartin |
404956d |
+ globals->root.sgot->output_section->vma
|
|
Kyle McMartin |
404956d |
- + globals->root.sgot->output_section->output_offset);
|
|
Kyle McMartin |
404956d |
+ + globals->root.sgot->output_offset);
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
|
|
Kyle McMartin |
404956d |
0, weak_undef_p);
|
|
Kyle McMartin |
404956d |
@@ -3873,10 +3873,9 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
|
|
Kyle McMartin |
404956d |
case BFD_RELOC_AARCH64_TLSDESC_LDR:
|
|
Kyle McMartin |
404956d |
if (globals->root.sgot == NULL)
|
|
Kyle McMartin |
404956d |
return bfd_reloc_notsupported;
|
|
Kyle McMartin |
404956d |
-
|
|
Kyle McMartin |
404956d |
value = (symbol_tlsdesc_got_offset (input_bfd, h, r_symndx)
|
|
Kyle McMartin |
404956d |
+ globals->root.sgotplt->output_section->vma
|
|
Kyle McMartin |
404956d |
- + globals->root.sgotplt->output_section->output_offset
|
|
Kyle McMartin |
404956d |
+ + globals->root.sgotplt->output_offset
|
|
Kyle McMartin |
404956d |
+ globals->sgotplt_jump_table_size);
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
|
|
Kyle McMartin |
404956d |
@@ -6627,7 +6626,7 @@ elfNN_aarch64_create_small_pltn_entry (struct elf_link_hash_entry *h,
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
plt_entry = plt->contents + h->plt.offset;
|
|
Kyle McMartin |
404956d |
plt_entry_address = plt->output_section->vma
|
|
Kyle McMartin |
404956d |
- + plt->output_section->output_offset + h->plt.offset;
|
|
Kyle McMartin |
404956d |
+ + plt->output_offset + h->plt.offset;
|
|
Kyle McMartin |
404956d |
gotplt_entry_address = gotplt->output_section->vma +
|
|
Kyle McMartin |
404956d |
gotplt->output_offset + got_offset;
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
@@ -6934,7 +6933,7 @@ elfNN_aarch64_init_small_plt0_entry (bfd *output_bfd ATTRIBUTE_UNUSED,
|
|
Kyle McMartin |
404956d |
+ GOT_ENTRY_SIZE * 2);
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
plt_base = htab->root.splt->output_section->vma +
|
|
Kyle McMartin |
404956d |
- htab->root.splt->output_section->output_offset;
|
|
Kyle McMartin |
404956d |
+ htab->root.splt->output_offset;
|
|
Kyle McMartin |
404956d |
|
|
Kyle McMartin |
404956d |
/* Fill in the top 21 bits for this: ADRP x16, PLT_GOT + n * 8.
|
|
Kyle McMartin |
404956d |
ADRP: ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */
|