26 lines
1,003 B
C
26 lines
1,003 B
C
/*
|
|
* REF: https://gabi.xinuos.com/elf/01-intro.html
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
|
|
/* Byte alignment for the ELF data types will always match the size.
|
|
* For example a structure containing an Elf32_Addr member will
|
|
* be aligned on a 4-byte boundary within the file.
|
|
*/
|
|
/* 32-Bit Data Types */
|
|
typedef uint32_t Elf32_Addr; /* Unsigned program address */
|
|
typedef uint32_t Elf32_Off; /* Unsigned file offset */
|
|
typedef uint16_t Elf32_Half; /* Unsigned medium integer */
|
|
typedef uint32_t Elf32_Word; /* Unsigned integer */
|
|
typedef int32_t Elf32_Sword; /* Signed integer */
|
|
/* 64-Bit Data Types */
|
|
typedef uint64_t Elf64_Addr; /* Unsigned program address */
|
|
typedef uint64_t Elf64_Off; /* Unsigned file offset */
|
|
typedef uint16_t Elf64_Half; /* Unsigned medium integer */
|
|
typedef uint32_t Elf64_Word; /* Unsigned integer */
|
|
typedef int32_t Elf64_Sword; /* Signed integer */
|
|
typedef uint64_t Elf64_Xword; /* Unsigned long integer */
|
|
typedef int64_t Elf64_Sxword; /* Signed long integer */
|
|
|
|
|