POK(kernelpart)
|
00001 /* 00002 * POK header 00003 * 00004 * The following file is a part of the POK project. Any modification should 00005 * made according to the POK licence. You CANNOT use this file or a part of 00006 * this file is this part of a file for your own project 00007 * 00008 * For more information on the POK licence, please see our LICENCE FILE 00009 * 00010 * Please follow the coding guidelines described in doc/CODING_GUIDELINES 00011 * 00012 * Copyright (c) 2007-2009 POK team 00013 * 00014 * Created by julien on Thu Jan 15 23:34:13 2009 00015 */ 00016 00017 00018 #ifndef ELF_H_ 00019 # define ELF_H_ 00020 00021 typedef uint16_t Elf32_Half; 00022 typedef uint32_t Elf32_Word; 00023 typedef uint32_t Elf32_Off; 00024 typedef uint32_t Elf32_Addr; 00025 00026 #define EI_NIDENT (16) 00027 00028 typedef struct 00029 { 00030 unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ 00031 Elf32_Half e_type; /* Object file type */ 00032 Elf32_Half e_machine; /* Architecture */ 00033 Elf32_Word e_version; /* Object file version */ 00034 Elf32_Addr e_entry; /* Entry point virtual address */ 00035 Elf32_Off e_phoff; /* Program header table file offset */ 00036 Elf32_Off e_shoff; /* Section header table file offset */ 00037 Elf32_Word e_flags; /* Processor-specific flags */ 00038 Elf32_Half e_ehsize; /* ELF header size in bytes */ 00039 Elf32_Half e_phentsize; /* Program header table entry size */ 00040 Elf32_Half e_phnum; /* Program header table entry count */ 00041 Elf32_Half e_shentsize; /* Section header table entry size */ 00042 Elf32_Half e_shnum; /* Section header table entry count */ 00043 Elf32_Half e_shstrndx; /* Section header string table index */ 00044 } Elf32_Ehdr; 00045 00046 /* Program segment header. */ 00047 00048 typedef struct 00049 { 00050 Elf32_Word p_type; /* Segment type */ 00051 Elf32_Off p_offset; /* Segment file offset */ 00052 Elf32_Addr p_vaddr; /* Segment virtual address */ 00053 Elf32_Addr p_paddr; /* Segment physical address */ 00054 Elf32_Word p_filesz; /* Segment size in file */ 00055 Elf32_Word p_memsz; /* Segment size in memory */ 00056 Elf32_Word p_flags; /* Segment flags */ 00057 Elf32_Word p_align; /* Segment alignment */ 00058 } Elf32_Phdr; 00059 00060 #endif /* !ELF_H_ */