summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-cris/locref3.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-cris/locref3.s')
-rw-r--r--ld/testsuite/ld-cris/locref3.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/ld/testsuite/ld-cris/locref3.s b/ld/testsuite/ld-cris/locref3.s
new file mode 100644
index 00000000000..7991097d99c
--- /dev/null
+++ b/ld/testsuite/ld-cris/locref3.s
@@ -0,0 +1,14 @@
+; Test-case primarily from PR26589, which could have been locref3.d.
+; A local (like "static") function, with all ELF decorations.
+.text
+ .type alocalfunc,@function
+ .p2align 1
+alocalfunc:
+ nop
+.Lfe1:
+ .size alocalfunc,.Lfe1-alocalfunc
+
+; Random absolute reference to the address of alocalfunc, requiring a
+; runtime relocation in code that needs to be PIC/PIE.
+ .data
+ .dword alocalfunc