diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-14 01:22:16 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-14 01:22:16 +0100 |
commit | 40757bf4bff18b05664c1bb1fc4a22f2628bde7a (patch) | |
tree | 33fdea2661bf1e1fc343dc376a309e3970983fcc /boot | |
parent | c92700a6eb1c21b03a4955fc7e7240611de69516 (diff) | |
parent | 076957fe8c12344ddae2fa4b966c7be9be232654 (diff) |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into dde
Diffstat (limited to 'boot')
-rw-r--r-- | boot/Makefile | 3 | ||||
-rw-r--r-- | boot/boot.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/boot/Makefile b/boot/Makefile index 497e2a30d..b24022203 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -30,8 +30,7 @@ UX-OBJS = mach-crt0.o uxboot.o sigvec.o syscall.o ux.o $(COMMON-OBJS) target = boot io-MIGSFLAGS=-DREPLY_PORTS HURDLIBS = store shouldbeinlibc -OTHERLIBS = -lpthread -DIST_FILES=frank1.ld frankemul.ld +LDLIBS += -lpthread include ../Makeconf diff --git a/boot/boot.c b/boot/boot.c index 56231074c..44cb6e865 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -281,7 +281,9 @@ load_image (task_t t, } read (fd, &hdr, sizeof hdr); - if (*(Elf32_Word *) hdr.e.e_ident == *(Elf32_Word *) "\177ELF") + /* File must have magic ELF number. */ + if (hdr.e.e_ident[0] == 0177 && hdr.e.e_ident[1] == 'E' && + hdr.e.e_ident[2] == 'L' && hdr.e.e_ident[3] == 'F') { Elf32_Phdr phdrs[hdr.e.e_phnum], *ph; lseek (fd, hdr.e.e_phoff, SEEK_SET); |