@@ -31,6 +31,22 @@ pub type id_t = i32;
3131pub type idtype_t = :: c_uint ;
3232pub type fd_mask = u32 ;
3333
34+ pub type Elf32_Addr = u32 ;
35+ pub type Elf32_Half = u16 ;
36+ pub type Elf32_Lword = u64 ;
37+ pub type Elf32_Off = u32 ;
38+ pub type Elf32_Sword = i32 ;
39+ pub type Elf32_Word = u32 ;
40+
41+ pub type Elf64_Addr = u64 ;
42+ pub type Elf64_Half = u16 ;
43+ pub type Elf64_Lword = u64 ;
44+ pub type Elf64_Off = u64 ;
45+ pub type Elf64_Sword = i32 ;
46+ pub type Elf64_Sxword = i64 ;
47+ pub type Elf64_Word = u32 ;
48+ pub type Elf64_Xword = u64 ;
49+
3450#[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
3551pub enum timezone { }
3652impl :: Copy for timezone { }
@@ -343,6 +359,17 @@ s! {
343359 pub sdl_slen: u8 ,
344360 pub sdl_data: [ u8 ; 46 ] ,
345361 }
362+
363+ pub struct dl_phdr_info {
364+ pub dlpi_addr: Elf_Addr ,
365+ pub dlpi_name: * const :: c_char,
366+ pub dlpi_phdr: * const Elf_Phdr ,
367+ pub dlpi_phnum: Elf_Half ,
368+ pub dlpi_adds: :: c_ulonglong,
369+ pub dlpi_subs: :: c_ulonglong,
370+ pub dlpi_tls_modid: usize ,
371+ pub dlpi_tls_data: * mut :: c_void,
372+ }
346373}
347374
348375s_no_extra_traits ! {
@@ -1650,6 +1677,17 @@ extern "C" {
16501677 pub fn pututxline ( ut : * const utmpx ) -> * mut utmpx ;
16511678 pub fn setutxent ( ) ;
16521679 pub fn endutxent ( ) ;
1680+
1681+ pub fn dl_iterate_phdr (
1682+ callback : :: Option <
1683+ unsafe extern "C" fn (
1684+ info : * mut dl_phdr_info ,
1685+ size : usize ,
1686+ data : * mut :: c_void ,
1687+ ) -> :: c_int ,
1688+ > ,
1689+ data : * mut :: c_void ,
1690+ ) -> :: c_int ;
16531691}
16541692
16551693cfg_if ! {
0 commit comments