summaryrefslogtreecommitdiffstats
path: root/usr/klibc/arch/ppc64/crt0.S
blob: ed14534d3a04784046d42981b4bf4815743916d4 (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
#
# arch/ppc64/crt0.S
#
# void _start(void)
# {
#    /* Divine up argc, argv, and envp */
#    environ = envp;
#    exit(main(argc, argv, envp));
# }
#

	.text
	.balign 4
	.globl	_start
#if _CALL_ELF == 2
	.type _start,@function
_start:
#else
	.section ".opd","aw"
	.balign 8
_start:
	.quad	._start, .TOC.@tocbase, 0
	.previous
	.type	._start,@function
._start:
#endif

#if _CALL_ELF == 2
0:	addis	2,12,.TOC.-0b@ha
	addi	2,2,.TOC.-0b@l
#endif

	stdu	%r1,-32(%r1)
	addi	%r3,%r1,32
	li	%r4,0		/* fini (unused) */
	b	__libc_init
	nop

#if _CALL_ELF == 2
	.size _start,.-_start
#else
	.size _start,.-._start
#endif