summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/elf.h
blob: 8e51f710bd7c87b0d018b303d8ff3c5cefbb4394 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _IPXE_ELF_H
#define _IPXE_ELF_H

/**
 * @file
 *
 * ELF image format
 *
 */

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

#include <stdint.h>
#include <ipxe/image.h>
#include <elf.h>

typedef Elf32_Ehdr	Elf_Ehdr;
typedef Elf32_Phdr	Elf_Phdr;
typedef Elf32_Off	Elf_Off;
#define ELFCLASS	ELFCLASS32

extern 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 );
extern int elf_load ( struct image *image, physaddr_t *entry, physaddr_t *max );

#endif /* _IPXE_ELF_H */