1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//! The ELF 64-bit struct definitions and associated values

pub mod header;
pub mod program_header;
pub mod dyn;
pub mod rela;
pub mod sym;

#[cfg(not(feature = "pure"))]
pub mod gnu_hash;

#[cfg(not(feature = "pure"))]
pub use self::impure::*;

#[cfg(not(feature = "pure"))]
mod impure {

    elf_from_fd!(::std::u64::MAX);

    #[cfg(test)]
    mod tests {
        use std::path::Path;

        #[test]
        fn read_ls() {
            assert!(super::Binary::from_path(Path::new("/bin/ls")).is_ok());
        }
    }
}