From patchwork Sun Mar 18 19:44:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 26367 Received: (qmail 687 invoked by alias); 18 Mar 2018 19:45:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 398 invoked by uid 89); 18 Mar 2018 19:45:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=H*r:sk:static-, Hx-spam-relays-external:sk:static-, H*RU:sk:static- X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd, commited 3/5] hurd: Fix boot with statically-linked exec server Date: Sun, 18 Mar 2018 20:44:49 +0100 Message-Id: <20180318194451.11862-4-samuel.thibault@ens-lyon.org> In-Reply-To: <20180318194451.11862-1-samuel.thibault@ens-lyon.org> References: <20180318194451.11862-1-samuel.thibault@ens-lyon.org> * 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). --- ChangeLog | 2 ++ sysdeps/mach/hurd/i386/init-first.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a02f9017de..e090c75b74 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 diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c index f4a4df33de..226de02a99 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),