1 /** 2 * syslinux/module.h 3 * 4 * Dynamic ELF modules definitions and services. 5 */ 6 7 #ifndef I386_MODULE_H_ 8 #define I386_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 ELFCLASS32 // 32-bit modules 17 #define MODULE_ELF_CLASS_SIZE 32 // 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_386 // Target architecture 22 23 #define ELF_MOD_SYS "32 bit" 24 25 typedef Elf32_Addr Elf_Addr; 26 typedef Elf32_Dyn Elf_Dyn; 27 typedef Elf32_Word Elf_Word; 28 typedef Elf32_Off Elf_Off; 29 typedef Elf32_Sym Elf_Sym; 30 typedef Elf32_Ehdr Elf_Ehdr; 31 typedef Elf32_Phdr Elf_Phdr; 32 typedef Elf32_Rel Elf_Rel; 33 typedef Elf32_Word Elf_Bword; 34 35 #endif // I386_MODULE_H_ 36