diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2018-06-06 09:59:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-18 10:02:29 +0200 |
commit | 7c8679eebc8e4e69ba0afa370d85d3d6eb386997 (patch) | |
tree | b8067eefd5643a48851f634615cb243fca68b746 /include/elf.h | |
parent | 32bb4ca56b1b01006fcb7058049038fbb8dc10cf (diff) | |
download | barebox-7c8679eebc8e4e69ba0afa370d85d3d6eb386997.tar.gz barebox-7c8679eebc8e4e69ba0afa370d85d3d6eb386997.tar.xz |
add basic ELF parser
This parser is needed for kernel boot support on MIPS
and can potentially reused on other platforms.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/elf.h')
-rw-r--r-- | include/elf.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/elf.h b/include/elf.h index ebcec7db0d..92c8d9c127 100644 --- a/include/elf.h +++ b/include/elf.h @@ -2,6 +2,7 @@ #define _LINUX_ELF_H #include <linux/types.h> +#include <linux/list.h> //#include <linux/auxvec.h> //#include <linux/elf-em.h> #include <asm/elf.h> @@ -397,4 +398,13 @@ static inline void arch_write_notes(struct file *file) { } #define ELF_CORE_WRITE_EXTRA_NOTES arch_write_notes(file) #endif /* ARCH_HAVE_EXTRA_ELF_NOTES */ +struct elf_image { + struct list_head list; + unsigned long entry; + void *buf; +}; + +struct elf_image *elf_load_image(void *buf); +void elf_release_image(struct elf_image *elf); + #endif /* _LINUX_ELF_H */ |