summaryrefslogtreecommitdiff
path: root/src/ldso/powerpc/start.s
blob: 6c499e8e414c73c6691b5eda24d6e230cb2d16d6 (plain) (blame)
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
	.global _start
	.type   _start,@function
_start:
	bl      1f
2:	.long   _DYNAMIC-2b
1:	mflr    5
	lwz     0, 0(5)
	add     5, 0, 5
	lwz     3, 0(1)
	addi    4, 1, 4
	addi    1, 1, -16
	bl      __reloc_self

	lwz     3, 16(1)
	addi    4, 1, 20
	bl      __dynlink
	addi    1, 1, 16

	lwz     4, 0(1)
1:	addi    4, 4, -1
	lwzu    5, 4(1)
	cmpwi   5, -1
	beq-    1b
	addi    4, 4, 1
	stwu    4, -4(1)

	mtlr    3
	li      3, 0
	blr