From f664ea2fb2d1a0a8c4b0d2ab3e1647440da4e245 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 3 Mar 2018 10:47:56 +0000 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 Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name tg-exec-static.diff --- sysdeps/mach/hurd/i386/init-first.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c index 594787cdd..e0665fd5e 100644 --- a/sysdeps/mach/hurd/i386/init-first.c +++ b/sysdeps/mach/hurd/i386/init-first.c @@ -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 -- 2.30.2