ELF bootable image.
Definition in file elfboot.c.
static int elfboot_probe |
( |
struct image * |
image | ) |
|
|
static |
Probe ELF image.
- Parameters
-
- Return values
-
Definition at line 108 of file elfboot.c.
110 static const uint8_t e_ident[] = {
125 if (
memcmp ( ehdr.
e_ident, e_ident, sizeof ( e_ident ) ) != 0 ) {
126 DBGC (
image,
"Invalid ELF identifier\n" );
132 &entry, &
max ) ) != 0 ) {
133 DBGC (
image,
"Unloadable ELF image\n" );
struct arbelprm_rc_send_wqe rc
userptr_t data
Raw file image.
#define ENOEXEC
Exec format error.
static __always_inline void copy_from_user(void *dest, userptr_t src, off_t src_off, size_t len)
Copy data from user buffer.
unsigned char e_ident[EI_NIDENT]
int elf_segments(struct image *image, Elf_Ehdr *ehdr, int(*process)(struct image *image, Elf_Phdr *phdr, physaddr_t dest), physaddr_t *entry, physaddr_t *max)
Process ELF segments.
static int elfboot_check_segment(struct image *image, Elf_Phdr *phdr, physaddr_t dest)
Check that ELF segment uses flat physical addressing.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
References copy_from_user(), image::data, DBGC, Elf32_Ehdr::e_ident, EI_CLASS, EI_DATA, EI_MAG0, EI_MAG1, EI_MAG2, EI_MAG3, EI_VERSION, elf_segments(), elfboot_check_segment(), ELFCLASS32, ELFDATA2LSB, ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, ENOEXEC, EV_CURRENT, max, memcmp(), and rc.