File: tg-exec-static.diff

package info (click to toggle)
glibc 2.24-11%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 225,316 kB
  • sloc: ansic: 996,116; asm: 261,826; sh: 10,483; makefile: 9,849; cpp: 4,169; python: 3,971; perl: 2,254; awk: 1,753; pascal: 1,521; yacc: 291; sed: 80
file content (23 lines) | stat: -rw-r--r-- 910 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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>

---
 sysdeps/mach/hurd/i386/init-first.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -168,7 +168,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