8 #include <sys/elfcommon.h>
10 /* ELF standard typedefs (yet more proof that <stdint.h> was way overdue) */
11 typedef uint16_t Elf64_Half
;
12 typedef int16_t Elf64_SHalf
;
13 typedef uint32_t Elf64_Word
;
14 typedef int32_t Elf64_Sword
;
15 typedef uint64_t Elf64_Xword
;
16 typedef int64_t Elf64_Sxword
;
18 typedef uint64_t Elf64_Off
;
19 typedef uint64_t Elf64_Addr
;
20 typedef uint16_t Elf64_Section
;
24 typedef struct elf64_dyn
{
34 #define ELF64_R_SYM(x) ((x) >> 32)
35 #define ELF64_R_TYPE(x) ((x) & 0xffffffff)
37 typedef struct elf64_rel
{
42 typedef struct elf64_rela
{
45 Elf64_Sxword r_addend
;
50 typedef struct elf64_sym
{
52 unsigned char st_info
;
53 unsigned char st_other
;
59 /* Main file header */
61 typedef struct elf64_hdr
{
62 unsigned char e_ident
[EI_NIDENT
];
71 Elf64_Half e_phentsize
;
73 Elf64_Half e_shentsize
;
75 Elf64_Half e_shstrndx
;
80 typedef struct elf64_phdr
{
93 typedef struct elf64_shdr
{
102 Elf64_Xword sh_addralign
;
103 Elf64_Xword sh_entsize
;
107 typedef struct elf64_note
{
108 Elf64_Word n_namesz
; /* Name size */
109 Elf64_Word n_descsz
; /* Content size */
110 Elf64_Word n_type
; /* Content type */
113 #endif /* _SYS_ELF64_H */