aboutsummaryrefslogtreecommitdiff
blob: 33445a6d006a1d28bb647fd89ace3836d25dae7a (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
	.macro	loadtoc,sym
	.if	size == 32
	lwz	1,\sym(2)
	.else
	ld	1,\sym(2)
	.endif
	.endm

	.toc
LC01:	.tc	stuff[TC],stuff[RW]

	.globl	foo1
	.csect	foo1[pr]
foo1:
	.align	8
	nop
	loadtoc	LC01

	.globl	foo2
	.csect	foo2[pr]
foo2:
	nop
	loadtoc	LC01
	.ref	foo4 , foo6

	.globl	foo3
	.csect	foo3[pr]
foo3:
	nop
	loadtoc	LC01

	.globl	foo4
	.csect	foo4[pr]
foo4:
	nop
	loadtoc	LC01

	.globl	foo5
	.csect	foo5[pr]
foo5:
	nop
	loadtoc	LC01
	.ref	foo3

	.globl	foo6
	.csect	foo6[pr]
foo6:
	nop
	loadtoc	LC01

	.csect	foo1[pr]
	blr
	.ref	foo2

	.csect	stuff[rw]
stuff:
	.long	1