Fix boot with statically-linked exec server.
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
* 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>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-exec-static.diff

sysdeps/mach/hurd/i386/init-first.c

index 251831e248821b81ec502fd6b92da751750d6851..8753b543f97c76bbe5acb588202a07ae5e8d8123 100644 (file)
@@ -165,7 +165,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)
     {
       /* With a new enough linker (binutils-2.23 or better),
          the magic __ehdr_start symbol will be available and