summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
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-28.d19
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-28.s5
4 files changed, 31 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index b03786c9ae7..a68a217ecb3 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2015-06-01 Jiong Wang <jiong.wang@arm.com>
+ * ld-aarch64/emit-relocs-28.s: New test file.
+ * ld-aarch64/emit-relocs-28.d: Ditto.
+ * ld-aarch64/aarch64-elf.exp: Run new test.
+
+2015-06-01 Jiong Wang <jiong.wang@arm.com>
+
* ld-aarch64/tprel_add_lo12_overflow.s: New testcase.
* ld-aarch64/tprel_add_lo12_overflow.d: Nex expectation file.
* ld-aarch64/aarch64-elf.exp: Run new testcase.
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 09f2a0e1631..021343b3f8c 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -50,6 +50,7 @@ run_dump_test "erratum843419"
# Relocation Tests
run_dump_test "weak-undefined"
+run_dump_test "emit-relocs-28"
run_dump_test "emit-relocs-257"
run_dump_test "emit-relocs-257-be"
# 258 is tested in 257
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-28.d b/ld/testsuite/ld-aarch64/emit-relocs-28.d
new file mode 100644
index 00000000000..f138fb1faf0
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/emit-relocs-28.d
@@ -0,0 +1,19 @@
+#source: emit-relocs-28.s
+#as: -mabi=ilp32
+#ld: -m aarch64linux32 --defsym globala=0x11000 --defsym globalb=0x45000 --defsym globalc=0x1234 -e0 --emit-relocs
+#objdump: -dr
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+00400074 <\.text>:
+ 400074: 90000082 adrp x2, 410000 <globalb\+0x3cb000>
+ 400074: R_AARCH64_P32_ADR_PREL_PG_HI21 _GLOBAL_OFFSET_TABLE_
+ 400078: f9408c40 ldr x0, \[x2,#280\]
+ 400078: R_AARCH64_P32_LD32_GOTPAGE_LO14 globala
+ 40007c: f9409040 ldr x0, \[x2,#288\]
+ 40007c: R_AARCH64_P32_LD32_GOTPAGE_LO14 globalb
+ 400080: f9408840 ldr x0, \[x2,#272\]
+ 400080: R_AARCH64_P32_LD32_GOTPAGE_LO14 globalc
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-28.s b/ld/testsuite/ld-aarch64/emit-relocs-28.s
new file mode 100644
index 00000000000..b13a0e5262b
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/emit-relocs-28.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]