aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-nios2/relax_call26_cache.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-nios2/relax_call26_cache.s')
-rw-r--r--ld/testsuite/ld-nios2/relax_call26_cache.s28
1 files changed, 28 insertions, 0 deletions
diff --git a/ld/testsuite/ld-nios2/relax_call26_cache.s b/ld/testsuite/ld-nios2/relax_call26_cache.s
new file mode 100644
index 0000000..3712853
--- /dev/null
+++ b/ld/testsuite/ld-nios2/relax_call26_cache.s
@@ -0,0 +1,28 @@
+# test for call26 relaxation via linker stubs
+#
+# The purpose of this test is to ensure that, when section text0 straddles
+# a 256MB memory segment boundary with calls to the same function on either
+# side, the stub caching doesn't get confused and incorrectly use a stub
+# on the wrong side.
+
+.globl text0
+.section text0, "ax", @progbits
+ call func2a # in distant section
+ call func2a # in distant section
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ call func2a # in distant section
+ call func2a # in distant section
+
+.section text2, "ax", @progbits
+.globl func2a
+func2a:
+ ret