diff options
author | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
commit | fa40f30b4253b1e05c46cc5e0c111176825b7623 (patch) | |
tree | 76cf2d26c0ce0ee7c6a2c1a1a2b65bc4d8e33029 /mdk-stage1/dietlibc/i386/start.S | |
parent | 327bd24f8e4291bd1882de1990dd7339f781a9cb (diff) | |
download | drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.gz drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.bz2 drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.tar.xz drakx-backup-do-not-use-fa40f30b4253b1e05c46cc5e0c111176825b7623.zip |
This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'.Corpo_2_1_1
Diffstat (limited to 'mdk-stage1/dietlibc/i386/start.S')
-rw-r--r-- | mdk-stage1/dietlibc/i386/start.S | 69 |
1 files changed, 39 insertions, 30 deletions
diff --git a/mdk-stage1/dietlibc/i386/start.S b/mdk-stage1/dietlibc/i386/start.S index 167bb779c..1a825fc2a 100644 --- a/mdk-stage1/dietlibc/i386/start.S +++ b/mdk-stage1/dietlibc/i386/start.S @@ -1,42 +1,51 @@ -#include "start.h" +#include "dietfeatures.h" +#include "PIC.h" -#ifdef __i386__ .text -.globl _start +.global _start _start: -#if 0 - popl %ecx - movl %esp, %esi - leal 4(%esp,%ecx,4),%eax +#if 1 + popl %ecx /* %ecx = argc */ + movl %esp,%esi /* %esi = argv */ + pushl %ecx #else - movl (%esp),%ecx /* %ecx = argc */ - leal 4(%esp),%esi /* %esi = argv */ - - leal 4(%esi,%ecx,4),%eax /* eax = 4*ecx+4 = envp */ + movl (%esp),%ecx /* %ecx = argc */ + leal 4(%esp),%esi /* %esi = argv */ #endif - pushl %eax - pushl %esi - pushl %ecx - movl %eax,environ + leal 4(%esi,%ecx,4),%eax /* %eax = envp = (4*ecx)+%esi+4 */ #ifdef WANT_DYNAMIC -/* in %edx we have the dynamic _fini ( register this if non null ) */ - test %edx, %edx - je .Linit +/* in %edx we have the ld.so dynamic _fini ( register this if non null ) */ push %edx - call atexit - pop %edx -.Linit: - call _init - push $_fini - call atexit - pop %edx #endif - call main - pushl %eax - call exit -.Lfefe: - .size _start,.Lfefe-_start + pushl %eax + pushl %esi + pushl %ecx + PIC_INIT /* non-PIC: this is an empty line */ + PUT_VAR %eax, environ, %ecx /* non-PIC: movl %eax,environ */ + +#ifdef PROFILING + pushl $_etext + pushl $.text + call monitor + addl $0x8, %esp +#endif + +#ifdef WANT_DYNAMIC + call _dyn_start +#else + call main +#endif + +#ifdef PROFILING + pushl %eax + call _stop_monitor + popl %eax #endif + pushl %eax + call exit + hlt /* die now ! will ya ... */ +.Lstart: + .size _start,.Lstart-_start |