[uClibc-cvs] svn commit: trunk/uClibc/ldso/ldso
jocke at uclibc.org
jocke at uclibc.org
Mon Jun 27 22:20:45 UTC 2005
Author: jocke
Date: 2005-06-27 16:20:44 -0600 (Mon, 27 Jun 2005)
New Revision: 10604
Log:
Add __libc_stack_end to ld.so. The libc.a version remains to do.
sjhill, feel free to comment :)
Modified:
trunk/uClibc/ldso/ldso/dl-startup.c
Changeset:
Modified: trunk/uClibc/ldso/ldso/dl-startup.c
===================================================================
--- trunk/uClibc/ldso/ldso/dl-startup.c 2005-06-26 07:52:45 UTC (rev 10603)
+++ trunk/uClibc/ldso/ldso/dl-startup.c 2005-06-27 22:20:44 UTC (rev 10604)
@@ -97,9 +97,9 @@
/* Static declarations */
int (*_dl_elf_main) (int, char **, char **);
+static void* __rtld_stack_end; /* Points to argc on stack, e.g *((long *)__rtld_stackend) == argc */
+strong_alias(__rtld_stack_end, __libc_stack_end); /* Exported version of __rtld_stack_end */
-
-
/* When we enter this piece of code, the program stack looks like this:
argc argument counter (integer)
argv[0] program name (pointer)
@@ -290,6 +290,11 @@
free to start using global variables, since these things have all been
fixed up by now. Still no function calls outside of this library ,
since the dynamic resolver is not yet ready. */
+
+ __rtld_stack_end = (void *)args; /* Needs to be after ld.so self relocation */
+ if (*((long *)__rtld_stack_end) != argc) {
+ SEND_STDERR_DEBUG("__rtld_stack_end doesn't point to argc!");
+ }
_dl_get_ready_to_run(tpnt, load_addr, auxvt, envp, argv);
More information about the uClibc-cvs
mailing list