diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-03-13 17:06:48 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-03-13 17:06:48 +0100 |
commit | 6b450f1ee8eaf7e87d488664a9a77d22fb646b4d (patch) | |
tree | eec492af5b672ba0d848d71df4722cb082620b2a | |
parent | 1333c0ac86766a06a87588eb83813c9ac5246af8 (diff) |
Fix boot with statically-linked exec server.
* sysdeps/mach/hurd/i386/init-first.c (init): Also find ELF headers by oneself
when the pointer given in D is nul (as set by ext2fs).
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
-rw-r--r-- | .topmsg | 3 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/init-first.c | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,7 @@ From: Samuel Thibault <samuel.thibault@ens-lyon.org> Subject: [PATCH] Fix boot with statically-linked exec server. -* +* sysdeps/mach/hurd/i386/init-first.c (init): Also find ELF headers by oneself +when the pointer given in D is nul (as set by ext2fs). Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c index 746000542c..d66df4dd66 100644 --- a/sysdeps/mach/hurd/i386/init-first.c +++ b/sysdeps/mach/hurd/i386/init-first.c @@ -184,7 +184,7 @@ init (int *data) /* If we are the bootstrap task started by the kernel, then after the environment pointers there is no Hurd data block; the argument strings start there. */ - if ((void *) d == argv[0]) + if ((void *) d == argv[0] || !d->phdr) { /* We may need to see our own phdrs, e.g. for TLS setup. Try the usual kludge to find the headers without help from |