Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/i386/crt0.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 718 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 #
2 # arch/i386/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 .text
12 .align 4
13 .type _start,@function
14 .globl _start
15 _start:
16 # Save the address of the ELF argument array
17 movl %esp,%eax # Address of ELF arguments
18 # Set up a faux stack frame for the benefit of gdb
19 xorl %ebp,%ebp
20 push %ebp # Keep gdb from getting confused
21 push %ebp # Keep gdb from getting confused
22 # Push the arguments and called __libc_init()
23 #ifndef _REGPARM
24 push %edx # atexit() function
25 push %eax # ELF array
26 #endif
27 call __libc_init
28 # If __libc_init returns, problem...
29 hlt
30
31 .size _start, .-_start