8 #include <sys/elfcommon.h>
10 /* ELF standard typedefs (yet more proof that <stdint.h> was way overdue) */
11 typedef uint16_t Elf32_Half
;
12 typedef int16_t Elf32_SHalf
;
13 typedef uint32_t Elf32_Word
;
14 typedef int32_t Elf32_Sword
;
15 typedef uint64_t Elf32_Xword
;
16 typedef int64_t Elf32_Sxword
;
18 typedef uint32_t Elf32_Off
;
19 typedef uint32_t Elf32_Addr
;
20 typedef uint16_t Elf32_Section
;
24 typedef struct elf32_dyn
{
34 #define ELF32_R_SYM(x) ((x) >> 8)
35 #define ELF32_R_TYPE(x) ((x) & 0xff)
37 typedef struct elf32_rel
{
42 typedef struct elf32_rela
{
50 typedef struct elf32_sym
{
54 unsigned char st_info
;
55 unsigned char st_other
;
59 /* Main file header */
61 typedef struct elf32_hdr
{
62 unsigned char e_ident
[EI_NIDENT
];
71 Elf32_Half e_phentsize
;
73 Elf32_Half e_shentsize
;
75 Elf32_Half e_shstrndx
;
80 typedef struct elf32_phdr
{
93 typedef struct elf32_shdr
{
102 Elf32_Word sh_addralign
;
103 Elf32_Word sh_entsize
;
107 typedef struct elf32_note
{
108 Elf32_Word n_namesz
; /* Name size */
109 Elf32_Word n_descsz
; /* Content size */
110 Elf32_Word n_type
; /* Content type */
113 #endif /* _SYS_ELF32_H */