[uClibc-cvs] svn commit: trunk/uClibc/ldso/ldso/i386
jocke at uclibc.org
jocke at uclibc.org
Wed May 25 23:54:51 UTC 2005
Author: jocke
Date: 2005-05-25 17:54:50 -0600 (Wed, 25 May 2005)
New Revision: 10401
Log:
Prepare for standalone execution of ldso.
Modified:
trunk/uClibc/ldso/ldso/i386/dl-startup.h
Changeset:
Modified: trunk/uClibc/ldso/ldso/i386/dl-startup.h
===================================================================
--- trunk/uClibc/ldso/ldso/i386/dl-startup.h 2005-05-25 23:42:40 UTC (rev 10400)
+++ trunk/uClibc/ldso/ldso/i386/dl-startup.h 2005-05-25 23:54:50 UTC (rev 10401)
@@ -16,6 +16,17 @@
" call 1f\n"
"1: popl %ebx\n"
" addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx\n"
+ " # See if we were run as a command with the executable file\n"
+ " # name as an extra leading argument.\n"
+ " movl _dl_skip_args at GOTOFF(%ebx), %eax\n"
+ " # Pop the original argument count.\n"
+ " popl %edx\n"
+ " # Adjust the stack pointer to skip _dl_skip_args words.\n"
+ " leal (%esp,%eax,4), %esp\n"
+ " # Subtract _dl_skip_args from argc.\n"
+ " subl %eax, %edx\n"
+ " # Push argc back on the stack.\n"
+ " push %edx\n"
" # Pass our FINI ptr() to the user in %edx, as per ELF ABI.\n"
" leal _dl_fini at GOTOFF(%ebx), %edx\n"
" # Jump to the user's entry point.\n"
More information about the uClibc-cvs
mailing list