aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-nios2/relax_call26_boundary.s
blob: ce79ebdffd8d4a7303b9e1700fbf7bbd7d88a331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Test for call26 relaxation via linker stubs.
# This .s file is used with several different linker scripts that vary the
# placement of the sections in the output.
# Section text0 is 32 bytes long and requires at least 2 linker stubs
# (12 bytes each) to reach the call destinations in text2.  Another stub
# may be required to reach func0 if the section is laid out so that it crosses 
# a 256MB memory segment boundary.

.globl text0
.section text0, "ax", @progbits
	call func0	# in same section
	call func2a	# in distant section
	nop
	nop
	nop
	nop
	jmpi func2b	# in distant section

func0:
	ret

.section text2, "ax", @progbits
func2a:
	nop
	nop
	nop
	ret
func2b:
	nop