diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-03-24 14:36:00 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-03-24 14:36:00 +0000 |
commit | 8443afdc7ccfb5b56468e6beea99142ccdf8ebc4 (patch) | |
tree | 35dd4edcddaf48c27f0a6eee72e5c40cd6d95043 | |
parent | cb2072400d3ce10b23a08cc962664e275ff6da74 (diff) | |
download | glibc-8443afdc7ccfb5b56468e6beea99142ccdf8ebc4.zip glibc-8443afdc7ccfb5b56468e6beea99142ccdf8ebc4.tar.gz glibc-8443afdc7ccfb5b56468e6beea99142ccdf8ebc4.tar.bz2 |
* sysdeps/mach/hurd/i386/init-first.c: Include <assert.h>. (_dl_argv): Declare. (init) [SHARED]: Readjust _dl_argv if we switched to a new stack.
2001-03-24 Mark Kettenis <kettenis@gnu.org>
* sysdeps/mach/hurd/i386/init-first.c: Include <assert.h>.
(_dl_argv): Declare.
(init) [SHARED]: Readjust _dl_argv if we switched to a new stack.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/init-first.c | 11 |
2 files changed, 16 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2001-03-24 Mark Kettenis <kettenis@gnu.org> + + * sysdeps/mach/hurd/i386/init-first.c: Include <assert.h>. + (_dl_argv): Declare. + (init) [SHARED]: Readjust _dl_argv if we switched to a new stack. + 2001-03-22 Andreas Jaeger <aj@suse.de> * iconvdata/Makefile (generated): Add iconv-test.xxx. diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c index b26a9da..4e1b6bc 100644 --- a/sysdeps/mach/hurd/i386/init-first.c +++ b/sysdeps/mach/hurd/i386/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For i386/Hurd. - Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,2000,2001 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 @@ -17,6 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <assert.h> #include <hurd.h> #include <stdio.h> #include <unistd.h> @@ -42,6 +43,7 @@ int __libc_multiple_libcs = 1; extern int __libc_argc; extern char **__libc_argv; +extern char **_dl_argv; void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); @@ -165,6 +167,13 @@ init (int *data) newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data, (char *) d - (char *) data); +#ifdef SHARED + /* And readjust the dynamic linker's idea of where the argument + vector lives. */ + assert (_dl_argv == argv); + _dl_argv = (void *) ((int *) newsp + 1); +#endif + /* Set up the Hurd startup data block immediately following the argument and environment pointers on the new stack. */ od = (newsp + ((char *) d - (char *) data)); |