iPXE
elf.h
Go to the documentation of this file.
1#ifndef _IPXE_ELF_H
2#define _IPXE_ELF_H
3
4/**
5 * @file
6 *
7 * ELF image format
8 *
9 */
10
11FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
12
13#include <stdint.h>
14#include <ipxe/image.h>
15#include <elf.h>
16
20#define ELFCLASS ELFCLASS32
21
22extern int elf_segments ( struct image *image, const Elf_Ehdr *ehdr,
23 int ( * process ) ( struct image *image,
24 const Elf_Phdr *phdr,
26 physaddr_t *entry, physaddr_t *max );
27extern int elf_load ( struct image *image, physaddr_t *entry, physaddr_t *max );
28
29#endif /* _IPXE_ELF_H */
unsigned long physaddr_t
Definition stdint.h:20
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" retur dest)
Definition string.h:151
#define max(x, y)
Definition ath.h:41
uint32_t Elf32_Off
Definition elf.h:17
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
Executable images.
ELF image format.
Elf32_Off Elf_Off
Definition elf.h:19
int elf_load(struct image *image, physaddr_t *entry, physaddr_t *max)
Load ELF image into memory.
Definition elf.c:206
int elf_segments(struct image *image, const Elf_Ehdr *ehdr, int(*process)(struct image *image, const Elf_Phdr *phdr, physaddr_t dest), physaddr_t *entry, physaddr_t *max)
Process ELF segments.
Definition elf.c:157
Elf32_Ehdr Elf_Ehdr
Definition elf.h:17
Elf32_Phdr Elf_Phdr
Definition elf.h:18
ELF header.
Definition elf.h:25
ELF program header.
Definition elf.h:67
An executable image.
Definition image.h:24
A process.
Definition process.h:18