Add a couple more ELF types
This commit is contained in:
parent
267375e999
commit
0f461200d4
@ -362,7 +362,11 @@ fn main() {
|
||||
"Elf32_Shdr" |
|
||||
"Elf64_Shdr" |
|
||||
"Elf32_Sym" |
|
||||
"Elf64_Sym" => ty.to_string(),
|
||||
"Elf64_Sym" |
|
||||
"Elf32_Ehdr" |
|
||||
"Elf64_Ehdr" |
|
||||
"Elf32_Chdr" |
|
||||
"Elf64_Chdr" => ty.to_string(),
|
||||
|
||||
// Fixup a few types on windows that don't actually exist.
|
||||
"time64_t" if windows => "__time64_t".to_string(),
|
||||
|
@ -483,6 +483,40 @@ s! {
|
||||
pub dlpi_tls_data: *mut ::c_void,
|
||||
}
|
||||
|
||||
pub struct Elf32_Ehdr {
|
||||
pub e_ident: [::c_uchar; 16],
|
||||
pub e_type: Elf32_Half,
|
||||
pub e_machine: Elf32_Half,
|
||||
pub e_version: Elf32_Word,
|
||||
pub e_entry: Elf32_Addr,
|
||||
pub e_phoff: Elf32_Off,
|
||||
pub e_shoff: Elf32_Off,
|
||||
pub e_flags: Elf32_Word,
|
||||
pub e_ehsize: Elf32_Half,
|
||||
pub e_phentsize: Elf32_Half,
|
||||
pub e_phnum: Elf32_Half,
|
||||
pub e_shentsize: Elf32_Half,
|
||||
pub e_shnum: Elf32_Half,
|
||||
pub e_shstrndx: Elf32_Half,
|
||||
}
|
||||
|
||||
pub struct Elf64_Ehdr {
|
||||
pub e_ident: [::c_uchar; 16],
|
||||
pub e_type: Elf64_Half,
|
||||
pub e_machine: Elf64_Half,
|
||||
pub e_version: Elf64_Word,
|
||||
pub e_entry: Elf64_Addr,
|
||||
pub e_phoff: Elf64_Off,
|
||||
pub e_shoff: Elf64_Off,
|
||||
pub e_flags: Elf64_Word,
|
||||
pub e_ehsize: Elf64_Half,
|
||||
pub e_phentsize: Elf64_Half,
|
||||
pub e_phnum: Elf64_Half,
|
||||
pub e_shentsize: Elf64_Half,
|
||||
pub e_shnum: Elf64_Half,
|
||||
pub e_shstrndx: Elf64_Half,
|
||||
}
|
||||
|
||||
pub struct Elf32_Sym {
|
||||
pub st_name: Elf32_Word,
|
||||
pub st_value: Elf32_Addr,
|
||||
@ -549,6 +583,19 @@ s! {
|
||||
pub sh_entsize: Elf64_Xword,
|
||||
}
|
||||
|
||||
pub struct Elf32_Chdr {
|
||||
pub ch_type: Elf32_Word,
|
||||
pub ch_size: Elf32_Word,
|
||||
pub ch_addralign: Elf32_Word,
|
||||
}
|
||||
|
||||
pub struct Elf64_Chdr {
|
||||
pub ch_type: Elf64_Word,
|
||||
pub ch_reserved: Elf64_Word,
|
||||
pub ch_size: Elf64_Xword,
|
||||
pub ch_addralign: Elf64_Xword,
|
||||
}
|
||||
|
||||
pub struct ucred {
|
||||
pub pid: ::pid_t,
|
||||
pub uid: ::uid_t,
|
||||
|
Loading…
Reference in New Issue
Block a user