diff options
author | Michael Brown | 2007-01-11 16:25:07 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-11 16:25:07 +0100 |
commit | 230f16538f4b0ad9ddd1edd7da24c52c39da0c8d (patch) | |
tree | 715fe194c396c42c845adcfe51db05ca6b9e88bf /src/image/elf.c | |
parent | Update TFTP to use a struct buffer rather than a callback. (diff) | |
download | ipxe-230f16538f4b0ad9ddd1edd7da24c52c39da0c8d.tar.gz ipxe-230f16538f4b0ad9ddd1edd7da24c52c39da0c8d.tar.xz ipxe-230f16538f4b0ad9ddd1edd7da24c52c39da0c8d.zip |
Create include/gpxe/elf.h for the ELF bits that aren't part of the ELF
standard and so don't belong in include/elf.h
Diffstat (limited to 'src/image/elf.c')
-rw-r--r-- | src/image/elf.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/image/elf.c b/src/image/elf.c index c746caa4..c76c8f5e 100644 --- a/src/image/elf.c +++ b/src/image/elf.c @@ -27,19 +27,12 @@ #include <elf.h> #include <gpxe/uaccess.h> #include <gpxe/segment.h> +#include <gpxe/elf.h> typedef Elf32_Ehdr Elf_Ehdr; typedef Elf32_Phdr Elf_Phdr; typedef Elf32_Off Elf_Off; -/** An ELF file */ -struct elf { - /** ELF file image */ - userptr_t image; - /** Length of ELF file image */ - size_t len; -}; - /** * Load ELF segment into memory * @@ -126,5 +119,8 @@ int elf_load ( struct elf *elf ) { return rc; } + /* Fill in entry point address */ + elf->entry = ehdr.e_entry; + return 0; } |