aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp1
-rw-r--r--ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.d18
-rw-r--r--ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.s11
3 files changed, 30 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index f0d2048..adb0081 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -258,6 +258,7 @@ run_dump_test_lp64 "morello-sizeless-local-syms"
run_dump_test_lp64 "morello-sizeless-global-syms"
run_dump_test_lp64 "morello-sizeless-got-syms"
run_dump_test_lp64 "morello-disallow-merged-binaries"
+run_dump_test_lp64 "c64-ehdr-sized-reloc"
run_dump_test_lp64 "morello-capinit"
run_dump_test_lp64 "morello-stubs"
diff --git a/ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.d b/ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.d
new file mode 100644
index 0000000..41c3cff
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.d
@@ -0,0 +1,18 @@
+#as: -march=morello+c64
+#ld: -shared
+#objdump: -dR -j .data
+
+.*: file format .*
+
+
+Disassembly of section \.data:
+
+00000000000[[:xdigit:]]* <val>:
+ ...
+ [[:xdigit:]]*: R_MORELLO_RELATIVE \*ABS\*
+# Want to check that the size is non-zero.
+# Check that using a negative line match to a zero size.
+# In fact, when this size is zero objdump doesn't even print a line here, but
+# that just adds extra robustness to our check.
+! .*: 00000000 \.word 0x00000000
+ .*: 01000000 .*
diff --git a/ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.s b/ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.s
new file mode 100644
index 0000000..3b750cf
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/c64-ehdr-sized-reloc.s
@@ -0,0 +1,11 @@
+ .data
+ .global val
+val:
+ .chericap __ehdr_start
+ .size val, .-val
+
+ .align 4
+ .text
+ .global _start
+_start:
+ ldr c0, [c0, :got_lo12:val]