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

	.section ".toc","aw"
.LC0:	.tc	environ[TC],environ

	.section ".opd","aw"
	.align 3
	.globl _start
_start:
	.quad	._start
	.quad	.TOC.@tocbase, 0

	.text
	.globl	._start
	.type	._start,@function
._start:
	ld	3,0(1)
	ld	4,8(1)
	ld	5,16(1)
	li	0,0
	stdu	0,-64(1)
	ld	9,.LC0@toc(2)
	std	5,0(9)
	bl	.main
	nop
	bl	.exit
	nop

	.size _start,.-_start