summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.topmsg3
-rw-r--r--sysdeps/mach/hurd/i386/init-first.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/.topmsg b/.topmsg
index 6576a2c249..abf55ac8b7 100644
--- a/.topmsg
+++ b/.topmsg
@@ -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