|
iPXE
|
ELF bootable image. More...
#include <string.h>#include <errno.h>#include <elf.h>#include <librm.h>#include <ipxe/image.h>#include <ipxe/elf.h>#include <ipxe/features.h>#include <ipxe/init.h>Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FEATURE (FEATURE_IMAGE, "ELF", DHCP_EB_FEATURE_ELF, 1) | |
| static int | elfboot_exec (struct image *image) |
| Execute ELF image. | |
| static int | elfboot_check_segment (struct image *image, const Elf_Phdr *phdr, physaddr_t dest) |
| Check that ELF segment uses flat physical addressing. | |
| static int | elfboot_probe (struct image *image) |
| Probe ELF image. | |
| struct image_type elfboot_image_type | __image_type (PROBE_NORMAL) |
| ELF image type. | |
ELF bootable image.
Definition in file elfboot.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FEATURE | ( | FEATURE_IMAGE | , |
| "ELF" | , | ||
| DHCP_EB_FEATURE_ELF | , | ||
| 1 | ) |
References DHCP_EB_FEATURE_ELF, and FEATURE_IMAGE.
|
static |
Execute ELF image.
| image | ELF image |
| rc | Return status code |
Definition at line 50 of file elfboot.c.
References __asm__(), __volatile__(), DBGC, ECANCELED, elf_load(), max, image::name, PHYS_CODE, rc, shutdown_boot(), and strerror().
Referenced by __image_type().
|
static |
Check that ELF segment uses flat physical addressing.
| image | ELF file |
| phdr | ELF program header |
| dest | Destination address |
| rc | Return status code |
Definition at line 92 of file elfboot.c.
References DBGC, dest, ENOEXEC, image::name, Elf32_Phdr::p_paddr, and Elf32_Phdr::p_vaddr.
Referenced by elfboot_probe().
|
static |
Probe ELF image.
| image | ELF file |
| rc | Return status code |
Definition at line 111 of file elfboot.c.
References 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, image::len, max, memcmp(), image::name, rc, and strerror().
Referenced by __image_type().
| struct image_type elfboot_image_type __image_type | ( | PROBE_NORMAL | ) |
ELF image type.
References __image_type, elfboot_exec(), elfboot_probe(), and PROBE_NORMAL.