summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2025-04-28 12:20:16 +0200
committerMichael Brown2025-04-28 14:06:18 +0200
commitba2135d0fd6052501d18917ca316e2a01eef10d7 (patch)
tree40c0efb39c11f054457c02168266b944dd497e64 /src/include
parent[multiboot] Use image name in Multiboot and ELF debug messages (diff)
downloadipxe-ba2135d0fd6052501d18917ca316e2a01eef10d7.tar.gz
ipxe-ba2135d0fd6052501d18917ca316e2a01eef10d7.tar.xz
ipxe-ba2135d0fd6052501d18917ca316e2a01eef10d7.zip
[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>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/elf.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/ipxe/elf.h b/src/include/ipxe/elf.h
index 033c3f7a8..8e51f710b 100644
--- a/src/include/ipxe/elf.h
+++ b/src/include/ipxe/elf.h
@@ -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 );