Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
elf.h File Reference

Go to the source code of this file.

Data Structures

struct  elf32_hdr
 
struct  elf64_hdr
 
struct  elf32_phdr
 
struct  elf64_phdr
 
struct  elf_info
 

Macros

#define PT_NULL   0
 
#define PT_LOAD   1
 
#define PT_DYNAMIC   2
 
#define PT_INTERP   3
 
#define PT_NOTE   4
 
#define PT_SHLIB   5
 
#define PT_PHDR   6
 
#define PT_TLS   7 /* Thread local storage segment */
 
#define PT_LOOS   0x60000000 /* OS-specific */
 
#define PT_HIOS   0x6fffffff /* OS-specific */
 
#define PT_LOPROC   0x70000000
 
#define PT_HIPROC   0x7fffffff
 
#define PT_GNU_EH_FRAME   0x6474e550
 
#define PT_GNU_STACK   (PT_LOOS + 0x474e551)
 
#define ET_NONE   0
 
#define ET_REL   1
 
#define ET_EXEC   2
 
#define ET_DYN   3
 
#define ET_CORE   4
 
#define ET_LOPROC   0xff00
 
#define ET_HIPROC   0xffff
 
#define EM_NONE   0
 
#define EM_PPC   20 /* PowerPC */
 
#define EM_PPC64   21 /* PowerPC64 */
 
#define EI_NIDENT   16
 
#define PF_R   0x4
 
#define PF_W   0x2
 
#define PF_X   0x1
 
#define EI_MAG0   0 /* e_ident[] indexes */
 
#define EI_MAG1   1
 
#define EI_MAG2   2
 
#define EI_MAG3   3
 
#define EI_CLASS   4
 
#define EI_DATA   5
 
#define EI_VERSION   6
 
#define EI_OSABI   7
 
#define EI_PAD   8
 
#define ELFMAG0   0x7f /* EI_MAG */
 
#define ELFMAG1   'E'
 
#define ELFMAG2   'L'
 
#define ELFMAG3   'F'
 
#define ELFMAG   "\177ELF"
 
#define SELFMAG   4
 
#define ELFCLASSNONE   0 /* EI_CLASS */
 
#define ELFCLASS32   1
 
#define ELFCLASS64   2
 
#define ELFCLASSNUM   3
 
#define ELFDATANONE   0 /* e_ident[EI_DATA] */
 
#define ELFDATA2LSB   1
 
#define ELFDATA2MSB   2
 
#define EV_NONE   0 /* e_version, EI_VERSION */
 
#define EV_CURRENT   1
 
#define EV_NUM   2
 
#define ELFOSABI_NONE   0
 
#define ELFOSABI_LINUX   3
 

Typedefs

typedef unsigned int Elf32_Addr
 
typedef unsigned short Elf32_Half
 
typedef unsigned int Elf32_Off
 
typedef signed int Elf32_Sword
 
typedef unsigned int Elf32_Word
 
typedef unsigned long long Elf64_Addr
 
typedef unsigned short Elf64_Half
 
typedef signed short Elf64_SHalf
 
typedef unsigned long long Elf64_Off
 
typedef signed int Elf64_Sword
 
typedef unsigned int Elf64_Word
 
typedef unsigned long long Elf64_Xword
 
typedef signed long long Elf64_Sxword
 
typedef struct elf32_hdr Elf32_Ehdr
 
typedef struct elf64_hdr Elf64_Ehdr
 
typedef struct elf32_phdr Elf32_Phdr
 
typedef struct elf64_phdr Elf64_Phdr
 

Functions

int parse_elf64 (void *hdr, struct elf_info *info)
 
int parse_elf32 (void *hdr, struct elf_info *info)
 

Macro Definition Documentation

#define EI_CLASS   4

Definition at line 120 of file elf.h.

#define EI_DATA   5

Definition at line 121 of file elf.h.

#define EI_MAG0   0 /* e_ident[] indexes */

Definition at line 116 of file elf.h.

#define EI_MAG1   1

Definition at line 117 of file elf.h.

#define EI_MAG2   2

Definition at line 118 of file elf.h.

#define EI_MAG3   3

Definition at line 119 of file elf.h.

#define EI_NIDENT   16

Definition at line 52 of file elf.h.

#define EI_OSABI   7

Definition at line 123 of file elf.h.

#define EI_PAD   8

Definition at line 124 of file elf.h.

#define EI_VERSION   6

Definition at line 122 of file elf.h.

#define ELFCLASS32   1

Definition at line 134 of file elf.h.

#define ELFCLASS64   2

Definition at line 135 of file elf.h.

#define ELFCLASSNONE   0 /* EI_CLASS */

Definition at line 133 of file elf.h.

#define ELFCLASSNUM   3

Definition at line 136 of file elf.h.

#define ELFDATA2LSB   1

Definition at line 139 of file elf.h.

#define ELFDATA2MSB   2

Definition at line 140 of file elf.h.

#define ELFDATANONE   0 /* e_ident[EI_DATA] */

Definition at line 138 of file elf.h.

#define ELFMAG   "\177ELF"

Definition at line 130 of file elf.h.

#define ELFMAG0   0x7f /* EI_MAG */

Definition at line 126 of file elf.h.

#define ELFMAG1   'E'

Definition at line 127 of file elf.h.

#define ELFMAG2   'L'

Definition at line 128 of file elf.h.

#define ELFMAG3   'F'

Definition at line 129 of file elf.h.

#define ELFOSABI_LINUX   3

Definition at line 147 of file elf.h.

#define ELFOSABI_NONE   0

Definition at line 146 of file elf.h.

#define EM_NONE   0

Definition at line 48 of file elf.h.

#define EM_PPC   20 /* PowerPC */

Definition at line 49 of file elf.h.

#define EM_PPC64   21 /* PowerPC64 */

Definition at line 50 of file elf.h.

#define ET_CORE   4

Definition at line 43 of file elf.h.

#define ET_DYN   3

Definition at line 42 of file elf.h.

#define ET_EXEC   2

Definition at line 41 of file elf.h.

#define ET_HIPROC   0xffff

Definition at line 45 of file elf.h.

#define ET_LOPROC   0xff00

Definition at line 44 of file elf.h.

#define ET_NONE   0

Definition at line 39 of file elf.h.

#define ET_REL   1

Definition at line 40 of file elf.h.

#define EV_CURRENT   1

Definition at line 143 of file elf.h.

#define EV_NONE   0 /* e_version, EI_VERSION */

Definition at line 142 of file elf.h.

#define EV_NUM   2

Definition at line 144 of file elf.h.

#define PF_R   0x4

Definition at line 90 of file elf.h.

#define PF_W   0x2

Definition at line 91 of file elf.h.

#define PF_X   0x1

Definition at line 92 of file elf.h.

#define PT_DYNAMIC   2

Definition at line 24 of file elf.h.

#define PT_GNU_EH_FRAME   0x6474e550

Definition at line 34 of file elf.h.

#define PT_GNU_STACK   (PT_LOOS + 0x474e551)

Definition at line 36 of file elf.h.

#define PT_HIOS   0x6fffffff /* OS-specific */

Definition at line 31 of file elf.h.

#define PT_HIPROC   0x7fffffff

Definition at line 33 of file elf.h.

#define PT_INTERP   3

Definition at line 25 of file elf.h.

#define PT_LOAD   1

Definition at line 23 of file elf.h.

#define PT_LOOS   0x60000000 /* OS-specific */

Definition at line 30 of file elf.h.

#define PT_LOPROC   0x70000000

Definition at line 32 of file elf.h.

#define PT_NOTE   4

Definition at line 26 of file elf.h.

#define PT_NULL   0

Definition at line 22 of file elf.h.

#define PT_PHDR   6

Definition at line 28 of file elf.h.

#define PT_SHLIB   5

Definition at line 27 of file elf.h.

#define PT_TLS   7 /* Thread local storage segment */

Definition at line 29 of file elf.h.

#define SELFMAG   4

Definition at line 131 of file elf.h.

Typedef Documentation

typedef unsigned int Elf32_Addr

Definition at line 5 of file elf.h.

typedef unsigned short Elf32_Half

Definition at line 6 of file elf.h.

typedef unsigned int Elf32_Off

Definition at line 7 of file elf.h.

typedef signed int Elf32_Sword

Definition at line 8 of file elf.h.

typedef unsigned int Elf32_Word

Definition at line 9 of file elf.h.

typedef unsigned long long Elf64_Addr

Definition at line 12 of file elf.h.

typedef unsigned short Elf64_Half

Definition at line 13 of file elf.h.

typedef unsigned long long Elf64_Off

Definition at line 15 of file elf.h.

typedef signed short Elf64_SHalf

Definition at line 14 of file elf.h.

typedef signed int Elf64_Sword

Definition at line 16 of file elf.h.

typedef signed long long Elf64_Sxword

Definition at line 19 of file elf.h.

typedef unsigned int Elf64_Word

Definition at line 17 of file elf.h.

typedef unsigned long long Elf64_Xword

Definition at line 18 of file elf.h.

Function Documentation

int parse_elf32 ( void hdr,
struct elf_info info 
)

Definition at line 50 of file elf_util.c.

int parse_elf64 ( void hdr,
struct elf_info info 
)

Definition at line 18 of file elf_util.c.