2009-03-11 Robert Millan <rmh@aybabtu.com>
* loader/i386/multiboot_elfxx.c (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
This commit is contained in:
parent
b7b50e5f31
commit
6394042e02
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-03-11 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
|
* loader/i386/multiboot_elfxx.c
|
||||||
|
(CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
|
||||||
|
|
||||||
2009-03-11 Felix Zielcke <fzielcke@z-51.de>
|
2009-03-11 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
|
* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
|
||||||
|
|
|
@ -63,10 +63,10 @@ CONCAT(grub_multiboot_load_elf, XX) (grub_file_t file, void *buffer)
|
||||||
|| ehdr->e_ident[EI_DATA] != ELFDATA2LSB
|
|| ehdr->e_ident[EI_DATA] != ELFDATA2LSB
|
||||||
|| ehdr->e_machine != E_MACHINE)
|
|| ehdr->e_machine != E_MACHINE)
|
||||||
return grub_error(GRUB_ERR_UNKNOWN_OS, "no valid ELF header found");
|
return grub_error(GRUB_ERR_UNKNOWN_OS, "no valid ELF header found");
|
||||||
|
|
||||||
if (ehdr->e_type != ET_EXEC)
|
if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN)
|
||||||
return grub_error (GRUB_ERR_UNKNOWN_OS, "invalid ELF file type");
|
return grub_error (GRUB_ERR_UNKNOWN_OS, "invalid ELF file type");
|
||||||
|
|
||||||
/* FIXME: Should we support program headers at strange locations? */
|
/* FIXME: Should we support program headers at strange locations? */
|
||||||
if (ehdr->e_phoff + ehdr->e_phnum * ehdr->e_phentsize > MULTIBOOT_SEARCH)
|
if (ehdr->e_phoff + ehdr->e_phnum * ehdr->e_phentsize > MULTIBOOT_SEARCH)
|
||||||
return grub_error (GRUB_ERR_BAD_OS, "program header at a too high offset");
|
return grub_error (GRUB_ERR_BAD_OS, "program header at a too high offset");
|
||||||
|
|
Loading…
Reference in a new issue