aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-18 19:52:39 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-18 20:38:26 +0100
commitaa2189295e4e531d05733d60bfd697c7a962b100 (patch)
tree0fc848c590995609ae9ebe02b8dc1178a73ba65a
parent72103e73c9a76784b9e8b27a7d5b802178d6755b (diff)
downloadglibc-aa2189295e4e531d05733d60bfd697c7a962b100.zip
glibc-aa2189295e4e531d05733d60bfd697c7a962b100.tar.gz
glibc-aa2189295e4e531d05733d60bfd697c7a962b100.tar.bz2
hurd: 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).
-rw-r--r--ChangeLog2
-rw-r--r--sysdeps/mach/hurd/i386/init-first.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a02f901..e090c75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,8 @@
path when flags contains O_NOFOLLOW.
* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Return ENOTDIR
if flags contains O_DIRECTORY and the result is a directory.
+ * 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).
2018-03-17 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 f4a4df3..226de02 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -107,7 +107,7 @@ init1 (int argc, char *arg0, ...)
/* 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 == NULL)
{
#ifndef SHARED
/* With a new enough linker (binutils-2.23 or better),