summaryrefslogtreecommitdiff
path: root/bfd/elfxx-aarch64.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2015-06-01 10:26:00 +0100
committerJiong Wang <jiong.wang@arm.com>2015-06-01 10:26:00 +0100
commit99ad26cb0d4f9152dbe5ed03b74020cc52d84d94 (patch)
tree502f8f3dae34bf81874a5c32c0a4043cc0d5d397 /bfd/elfxx-aarch64.c
parenta921b5bd708cc6e8afa3cf33443cda54b4e8cae6 (diff)
downloadbinutils-gdb-99ad26cb0d4f9152dbe5ed03b74020cc52d84d94.tar.gz
[AArch64] BFD Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
2015-06-01 Jiong Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (aarch64_reloc_got_type): Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_gc_swap_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. ld/testsuite/ * ld-aarch64/emit-relocs-313.s: New test file. * ld-aarch64/emit-relocs-313.d: Ditto. * ld-aarch64/aarch64-elf.exp: Run new test.
Diffstat (limited to 'bfd/elfxx-aarch64.c')
-rw-r--r--bfd/elfxx-aarch64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c
index 576df78b9f9..889b0d0e59d 100644
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -258,6 +258,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd,
break;
case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
+ case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
case BFD_RELOC_AARCH64_LDST128_LO12:
case BFD_RELOC_AARCH64_LDST16_LO12:
@@ -413,6 +414,11 @@ _bfd_aarch64_elf_resolve_relocation (bfd_reloc_code_real_type r_type,
value = PG (value + addend) - PG (place);
break;
+ case BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:
+ /* Caller must make sure addend is the base address of .got section. */
+ value = value - PG (addend);
+ break;
+
case BFD_RELOC_AARCH64_ADD_LO12:
case BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:
case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC: