summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/cris/crti.S
blob: d9e1397da05e322657daf11094c75ac354e9f5fe (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
/* glibc's sysdeps/cris/elf/initfini.c used for reference [PROLOG] */

	.section	.init
	.align	1
	.global	_init
	.type	_init, @function
_init:
	subq	4,$sp
	move.d	$r1,[$sp]
	move	$srp,$r1
	subq	4,$sp
	move.d	$r0,[$sp]
#ifdef __arch_v32
	lapc	_GLOBAL_OFFSET_TABLE_,$r0
#else
	move.d	$pc,$r0
	sub.d	.:GOTOFF,$r0
#endif
	.align	1

	.section	.fini
	.align	1
	.global	_fini
	.type	_fini, @function
_fini:
	subq	4,$sp
	move.d	$r1,[$sp]
	move	$srp,$r1
	subq	4,$sp
	move.d	$r0,[$sp]
#ifdef __arch_v32
	lapc	_GLOBAL_OFFSET_TABLE_,$r0
#else
	move.d	$pc,$r0
	sub.d	.:GOTOFF,$r0
#endif
	.align	1