diff options
Diffstat (limited to 'sysdeps/i386/elf')
-rw-r--r-- | sysdeps/i386/elf/start.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/i386/elf/start.S b/sysdeps/i386/elf/start.S index 7416c0a..e8ed204 100644 --- a/sysdeps/i386/elf/start.S +++ b/sysdeps/i386/elf/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the ELF i386 ABI. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -88,9 +88,11 @@ _start: call atexit popl %eax - /* Call the user's main function, and exit with its value. */ - call main + /* Call the user's main function, and exit with its value. + But let the libc call main. */ + movl $main, %eax pushl %eax + call __libc_start_main call exit hlt /* Crash if somehow `exit' does return. */ |