1 /**
2  * syslinux/module.h
3  *
4  * Dynamic ELF64 modules definitions and services.
5  */
6 
7 #ifndef _X86_64_MODULE_H_
8 #define _X86_64_MODULE_H_
9 
10 #include <elf.h>
11 
12 /*
13  * Accepted values for various ELF header parameters found in an ELF dynamic
14  * object.
15  */
16 #define MODULE_ELF_CLASS		ELFCLASS64		// 64-bit modules
17 #define MODULE_ELF_CLASS_SIZE		64			// Size of a word value
18 #define MODULE_ELF_DATA			ELFDATA2LSB		// Word endianess
19 #define MODULE_ELF_VERSION		EV_CURRENT		// Object version
20 #define MODULE_ELF_TYPE			ET_DYN			// Executable type (shared object - .so)
21 #define MODULE_ELF_MACHINE		EM_X86_64		// Target architecture
22 
23 #define ELF_MOD_SYS		"64 bit"
24 
25 typedef Elf64_Addr		Elf_Addr;
26 typedef Elf64_Dyn		Elf_Dyn;
27 typedef Elf64_Word		Elf_Word;
28 typedef Elf64_Off		Elf_Off;
29 typedef Elf64_Sym		Elf_Sym;
30 typedef Elf64_Ehdr		Elf_Ehdr;
31 typedef Elf64_Phdr		Elf_Phdr;
32 typedef Elf64_Rel		Elf_Rel;
33 typedef Elf64_Xword		Elf_Bword;
34 
35 #endif // _X86_64_MODULE_H_
36