aboutsummaryrefslogtreecommitdiff
path: root/ld
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 /ld
parenta921b5bd708cc6e8afa3cf33443cda54b4e8cae6 (diff)
downloadgdb-99ad26cb0d4f9152dbe5ed03b74020cc52d84d94.zip
gdb-99ad26cb0d4f9152dbe5ed03b74020cc52d84d94.tar.gz
gdb-99ad26cb0d4f9152dbe5ed03b74020cc52d84d94.tar.bz2
[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 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-313.d18
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-313.s5
4 files changed, 30 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 483baa7..9857040 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-01 Jiong Wang <jiong.wang@arm.com>
+
+ * ld-aarch64/emit-relocs-313.s: New test file.
+ * ld-aarch64/emit-relocs-313.d: Ditto.
+ * ld-aarch64/aarch64-elf.exp: Run new test.
+
2015-05-29 Stephen Kitt <steve@sk2.org>
* ld-pe/pe-run2.exp (test_direct2_link_dll): Add $CFLAGS to the
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index bfbbe24..79b5a3e 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -99,6 +99,7 @@ run_dump_test "emit-relocs-309-low-bad"
# 310 not done yet
run_dump_test "emit-relocs-311"
run_dump_test "emit-relocs-312"
+run_dump_test "emit-relocs-313"
# test addend correctness when --emit-relocs specified for non-relocatable obj.
run_dump_test "emit-relocs-local-addend"
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-313.d b/ld/testsuite/ld-aarch64/emit-relocs-313.d
new file mode 100644
index 0000000..0a7b5d1
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/emit-relocs-313.d
@@ -0,0 +1,18 @@
+#source: emit-relocs-313.s
+#ld: -T relocs.ld --defsym globala=0x11000 --defsym globalb=0x45000 --defsym globalc=0x1234 -e0 --emit-relocs
+#objdump: -dr
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0000000000010000 <\.text>:
+ 10000: 90000082 adrp x2, 20000 <_GLOBAL_OFFSET_TABLE_>
+ 10000: R_AARCH64_ADR_PREL_PG_HI21 _GLOBAL_OFFSET_TABLE_
+ 10004: f9400840 ldr x0, \[x2,#16\]
+ 10004: R_AARCH64_LD64_GOTPAGE_LO15 globala
+ 10008: f9400c40 ldr x0, \[x2,#24\]
+ 10008: R_AARCH64_LD64_GOTPAGE_LO15 globalb
+ 1000c: f9400440 ldr x0, \[x2,#8\]
+ 1000c: R_AARCH64_LD64_GOTPAGE_LO15 globalc
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-313.s b/ld/testsuite/ld-aarch64/emit-relocs-313.s
new file mode 100644
index 0000000..b13a0e5
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/emit-relocs-313.s
@@ -0,0 +1,5 @@
+ .text
+ adrp x2, _GLOBAL_OFFSET_TABLE_
+ ldr x0, [x2, #:gotpage_lo14:globala]
+ ldr x0, [x2, #:gotpage_lo14:globalb]
+ ldr x0, [x2, #:gotpage_lo14:globalc]