chiark / gitweb /
volume_id: provide libvolume_id.a file
[elogind.git] / klibc / klibc / arch / mips / crt0.S
1 #
2 # arch/mips/crt0.S
3 #
4 # Does arch-specific initialization and invokes __libc_init
5 # with the appropriate arguments.
6 #
7 # See __static_init.c or __shared_init.c for the expected
8 # arguments.
9 #
10
11 #include <machine/asm.h>
12
13 NESTED(__start, 32, sp)
14         subu    sp, 32
15         sw      zero, 16(sp)
16
17         lui     gp, %hi(_gp)            # Initialize gp
18         addiu   gp, gp, _gp
19         
20         addiu   a0, sp, 32              # Pointer to ELF entry structure
21         move    a1, v0                  # Kernel-provided atexit() pointer
22
23         jal     __libc_init
24
25         END(__start)