|
| 1 | +pub type c_long = i64; |
| 2 | +pub type c_ulong = u64; |
| 3 | + |
| 4 | +pub type __int64_t = ::c_long; |
| 5 | +pub type __uint64_t = ::c_ulong; |
| 6 | + |
| 7 | +pub type int_fast16_t = ::c_long; |
| 8 | +pub type int_fast32_t = ::c_long; |
| 9 | +pub type int_fast64_t = ::c_long; |
| 10 | +pub type uint_fast16_t = ::c_ulong; |
| 11 | +pub type uint_fast32_t = ::c_ulong; |
| 12 | +pub type uint_fast64_t = ::c_ulong; |
| 13 | + |
| 14 | +pub type __quad_t = ::c_long; |
| 15 | +pub type __u_quad_t = ::c_ulong; |
| 16 | +pub type __intmax_t = ::c_long; |
| 17 | +pub type __uintmax_t = ::c_ulong; |
| 18 | + |
| 19 | +pub type __squad_type = ::c_long; |
| 20 | +pub type __uquad_type = ::c_ulong; |
| 21 | +pub type __sword_type = ::c_long; |
| 22 | +pub type __uword_type = ::c_ulong; |
| 23 | +pub type __slong32_type = ::c_int; |
| 24 | +pub type __ulong32_type = ::c_uint; |
| 25 | +pub type __s64_type = ::c_long; |
| 26 | +pub type __u64_type = ::c_ulong; |
| 27 | + |
| 28 | +pub type Elf64_Half = u16; |
| 29 | +pub type Elf64_Word = u32; |
| 30 | +pub type Elf64_Off = u64; |
| 31 | +pub type Elf64_Addr = u64; |
| 32 | +pub type Elf64_Xword = u64; |
| 33 | +pub type Elf64_Sxword = i64; |
| 34 | +pub type Elf64_Section = u16; |
| 35 | + |
| 36 | +pub type Elf_Addr = ::Elf64_Addr; |
| 37 | +pub type Elf_Half = ::Elf64_Half; |
| 38 | +pub type Elf_Ehdr = ::Elf64_Ehdr; |
| 39 | +pub type Elf_Phdr = ::Elf64_Phdr; |
| 40 | +pub type Elf_Shdr = ::Elf64_Shdr; |
| 41 | +pub type Elf_Sym = ::Elf64_Sym; |
| 42 | + |
| 43 | +s! { |
| 44 | + pub struct Elf64_Ehdr { |
| 45 | + pub e_ident: [::c_uchar; 16], |
| 46 | + pub e_type: Elf64_Half, |
| 47 | + pub e_machine: Elf64_Half, |
| 48 | + pub e_version: Elf64_Word, |
| 49 | + pub e_entry: Elf64_Addr, |
| 50 | + pub e_phoff: Elf64_Off, |
| 51 | + pub e_shoff: Elf64_Off, |
| 52 | + pub e_flags: Elf64_Word, |
| 53 | + pub e_ehsize: Elf64_Half, |
| 54 | + pub e_phentsize: Elf64_Half, |
| 55 | + pub e_phnum: Elf64_Half, |
| 56 | + pub e_shentsize: Elf64_Half, |
| 57 | + pub e_shnum: Elf64_Half, |
| 58 | + pub e_shstrndx: Elf64_Half, |
| 59 | + } |
| 60 | + |
| 61 | + pub struct Elf64_Shdr { |
| 62 | + pub sh_name: Elf64_Word, |
| 63 | + pub sh_type: Elf64_Word, |
| 64 | + pub sh_flags: Elf64_Xword, |
| 65 | + pub sh_addr: Elf64_Addr, |
| 66 | + pub sh_offset: Elf64_Off, |
| 67 | + pub sh_size: Elf64_Xword, |
| 68 | + pub sh_link: Elf64_Word, |
| 69 | + pub sh_info: Elf64_Word, |
| 70 | + pub sh_addralign: Elf64_Xword, |
| 71 | + pub sh_entsize: Elf64_Xword, |
| 72 | + } |
| 73 | + |
| 74 | + pub struct Elf64_Sym { |
| 75 | + pub st_name: Elf64_Word, |
| 76 | + pub st_info: ::c_uchar, |
| 77 | + pub st_other: ::c_uchar, |
| 78 | + pub st_shndx: Elf64_Section, |
| 79 | + pub st_value: Elf64_Addr, |
| 80 | + pub st_size: Elf64_Xword, |
| 81 | + } |
| 82 | + |
| 83 | + pub struct Elf64_Phdr { |
| 84 | + pub p_type: ::Elf64_Word, |
| 85 | + pub p_flags: ::Elf64_Word, |
| 86 | + pub p_offset: ::Elf64_Off, |
| 87 | + pub p_vaddr: ::Elf64_Addr, |
| 88 | + pub p_paddr: ::Elf64_Addr, |
| 89 | + pub p_filesz: ::Elf64_Xword, |
| 90 | + pub p_memsz: ::Elf64_Xword, |
| 91 | + pub p_align: ::Elf64_Xword, |
| 92 | + } |
| 93 | +} |
0 commit comments