diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
commit | 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 (patch) | |
tree | 7c0c62debf8f9f145643102fb52b81afce743594 /mdk-stage1/dietlibc/i386/start.S | |
parent | 9097327dc1c667fc51b8e05cc7c0626fac96665d (diff) | |
download | drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.gz drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.bz2 drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.xz drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.zip |
import new version of dietlibc
Diffstat (limited to 'mdk-stage1/dietlibc/i386/start.S')
-rw-r--r-- | mdk-stage1/dietlibc/i386/start.S | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/mdk-stage1/dietlibc/i386/start.S b/mdk-stage1/dietlibc/i386/start.S index 8a2ba7e38..167bb779c 100644 --- a/mdk-stage1/dietlibc/i386/start.S +++ b/mdk-stage1/dietlibc/i386/start.S @@ -6,19 +6,33 @@ _start: #if 0 popl %ecx - movl %esp, %edx + movl %esp, %esi leal 4(%esp,%ecx,4),%eax #else movl (%esp),%ecx /* %ecx = argc */ - leal 4(%esp),%edx /* %edx = argv */ + leal 4(%esp),%esi /* %esi = argv */ - leal 4(%edx,%ecx,4),%eax /* eax = 4*ecx+4 = envp */ + leal 4(%esi,%ecx,4),%eax /* eax = 4*ecx+4 = envp */ #endif pushl %eax - pushl %edx + pushl %esi pushl %ecx movl %eax,environ +#ifdef WANT_DYNAMIC +/* in %edx we have the dynamic _fini ( register this if non null ) */ + test %edx, %edx + je .Linit + push %edx + call atexit + pop %edx +.Linit: + call _init + push $_fini + call atexit + pop %edx +#endif + call main pushl %eax call exit |