Skip to content

Commit

Permalink
Auto merge of #2192 - devnexen:netbsd_auxinfo, r=JohnTitor
Browse files Browse the repository at this point in the history
netbsd mapping auxiliary vectors type
  • Loading branch information
bors committed May 23, 2021
2 parents 02887ba + 8201707 commit 73cad69
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ cfg_if! {
type Elf_Addr = Elf64_Addr;
type Elf_Half = Elf64_Half;
type Elf_Phdr = Elf64_Phdr;
// Mainly code consumer is _dlauxinfo
type AuxInfo = Aux64Info;
} else if #[cfg(target_pointer_width = "32")] {
type Elf_Addr = Elf32_Addr;
type Elf_Half = Elf32_Half;
type Elf_Phdr = Elf32_Phdr;
// Mainly code consumer is _dlauxinfo
type AuxInfo = Aux32Info;
}
}

Expand Down Expand Up @@ -403,6 +407,16 @@ s! {
pub p_align: Elf64_Xword,
}

pub struct Aux32Info {
pub a_type: Elf32_Word,
pub a_v: Elf32_Word,
}

pub struct Aux64Info {
pub a_type: Elf64_Word,
pub a_v: Elf64_Xword,
}

// link.h

pub struct dl_phdr_info {
Expand Down Expand Up @@ -2074,6 +2088,10 @@ extern "C" {
data: *mut ::c_void,
) -> ::c_int;

// dlfcn.h

pub fn _dlauxinfo() -> *mut ::c_void;

pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t;
pub fn iconv(
cd: iconv_t,
Expand Down

0 comments on commit 73cad69

Please sign in to comment.