aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-aarch64/pcrel.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-aarch64/pcrel.s')
-rw-r--r--ld/testsuite/ld-aarch64/pcrel.s20
1 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/pcrel.s b/ld/testsuite/ld-aarch64/pcrel.s
new file mode 100644
index 0000000..df542ef
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/pcrel.s
@@ -0,0 +1,20 @@
+ .text
+ .align 2
+main:
+ # R_AARCH64_ADR_PREL_PG_HI21
+ # R_AARCH64_ADR_PREL_PG_HI21_NC
+ # R_AARCH64_ADR_LO_21
+ adrp x0, :pg_hi21:global_a
+ adrp x1, :pg_hi21_nc:global_a
+ adr x2, global_a
+
+ #R_AARCH64_LD_PREL_LO19
+ ldr x3, global_a
+
+ # R_AARCH64_PREL16
+ # R_AARCH64_PREL32
+ # R_AARCH64_PREL64
+ .hword global_a - .
+ .word global_a - .
+ .xword global_a - .
+