aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog8
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp1
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-258.s3
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-259.s3
-rw-r--r--ld/testsuite/ld-aarch64/pr22764.d18
-rw-r--r--ld/testsuite/ld-aarch64/pr22764.s6
6 files changed, 37 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 88be8d4..7e9e6dd 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,11 @@
+2018-02-05 Renlin Li <renlin.li@arm.com>
+
+ PR ld/22764
+ * testsuite/ld-aarch64/emit-relocs-258.s: Define symbol as an address.
+ * testsuite/ld-aarch64/emit-relocs-259.s: Likewise.
+ * testsuite/ld-aarch64/pr22764.s: New.
+ * testsuite/ld-aarch64/pr22764.d: New.
+
2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
PR ld/22782
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 2602a43..c67ffb1 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -285,6 +285,7 @@ run_dump_test "pr17415"
run_dump_test_lp64 "tprel_g2_overflow"
run_dump_test "tprel_add_lo12_overflow"
run_dump_test "protected-data"
+run_dump_test_lp64 "pr22764"
# ifunc tests
run_dump_test "ifunc-1"
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-258.s b/ld/testsuite/ld-aarch64/emit-relocs-258.s
index f724776..87bb657 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-258.s
+++ b/ld/testsuite/ld-aarch64/emit-relocs-258.s
@@ -1,5 +1,6 @@
+.global dummy
.text
-
+dummy:
ldr x0, .L1
.L1:
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-259.s b/ld/testsuite/ld-aarch64/emit-relocs-259.s
index 7e1ba3c..0977c9d 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-259.s
+++ b/ld/testsuite/ld-aarch64/emit-relocs-259.s
@@ -1,5 +1,6 @@
+.global dummy
.text
-
+dummy:
ldr x0, .L1
.L1:
diff --git a/ld/testsuite/ld-aarch64/pr22764.d b/ld/testsuite/ld-aarch64/pr22764.d
new file mode 100644
index 0000000..997519f
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/pr22764.d
@@ -0,0 +1,18 @@
+#source: pr22764.s
+#ld: -shared -T relocs.ld -defsym sym_abs1=0x1 -defsym sym_abs2=0x2 -defsym sym_abs3=0x3 -e0 --emit-relocs
+#notarget: aarch64_be-*-*
+#objdump: -dr
+#...
+
+Disassembly of section \.text:
+
+0000000000010000 \<\.text\>:
+ 10000: d503201f nop
+ ...
+ 10004: R_AARCH64_ABS64 sym_abs1
+ 1000c: 00000002 \.word 0x00000002
+ 1000c: R_AARCH64_ABS32 sym_abs2
+ 10010: 0003 \.short 0x0003
+ 10010: R_AARCH64_ABS16 sym_abs3
+ 10012: 0000 \.short 0x0000
+ 10014: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/pr22764.s b/ld/testsuite/ld-aarch64/pr22764.s
new file mode 100644
index 0000000..25e36b4
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/pr22764.s
@@ -0,0 +1,6 @@
+ .text
+ nop
+ .xword sym_abs1
+ .word sym_abs2
+ .short sym_abs3
+ nop