mirror of
https://github.com/ipxe/ipxe
synced 2026-01-24 21:24:47 +03:00
[multiboot] Remove userptr_t from Multiboot and ELF image parsing
Simplify Multiboot and ELF image parsing by assuming that the Multiboot and ELF headers are directly accessible via pointer dereferences, and add some missing header validations. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -19,9 +19,10 @@ typedef Elf32_Phdr Elf_Phdr;
|
||||
typedef Elf32_Off Elf_Off;
|
||||
#define ELFCLASS ELFCLASS32
|
||||
|
||||
extern int elf_segments ( struct image *image, Elf_Ehdr *ehdr,
|
||||
extern int elf_segments ( struct image *image, const Elf_Ehdr *ehdr,
|
||||
int ( * process ) ( struct image *image,
|
||||
Elf_Phdr *phdr, physaddr_t dest ),
|
||||
const Elf_Phdr *phdr,
|
||||
physaddr_t dest ),
|
||||
physaddr_t *entry, physaddr_t *max );
|
||||
extern int elf_load ( struct image *image, physaddr_t *entry, physaddr_t *max );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user