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.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/pcrel.s b/ld/testsuite/ld-aarch64/pcrel.s
index df542ef5de..c5e18d019e 100644
--- a/ld/testsuite/ld-aarch64/pcrel.s
+++ b/ld/testsuite/ld-aarch64/pcrel.s
@@ -1,3 +1,4 @@
+ .hidden global_b
.text
.align 2
main:
@@ -18,3 +19,8 @@ main:
.word global_a - .
.xword global_a - .
+ # Defined global symbol may bind externally because of copy relocation,
+ # while defined hidden symbol binds locally. LD should be able to
+ # differenciate this.
+ adrp x0, :pg_hi21:global_b
+ .xword global_b - .