diff --git a/src/ld_so/dso.rs b/src/ld_so/dso.rs index 964aef5c8e..e401cf5d36 100644 --- a/src/ld_so/dso.rs +++ b/src/ld_so/dso.rs @@ -8,7 +8,7 @@ use object::{ Dyn as _, GnuHashTable, HashTable as SysVHashTable, ProgramHeader as _, Rel as _, Rela as _, Sym as _, Version, VersionTable, }, - Endianness, NativeEndian, Object, StringTable, SymbolIndex, + NativeEndian, Object, StringTable, SymbolIndex, }; use super::{ @@ -27,11 +27,15 @@ use alloc::{ vec::Vec, }; use core::{ + ffi::c_char, mem::size_of, ptr::{self, NonNull}, slice, }; +pub const CHAR_BITS: usize = size_of::() * 8; +pub type Relr = usize; + #[cfg(target_pointer_width = "32")] mod shim { use object::{elf::*, read::elf::ElfFile32, NativeEndian}; @@ -46,9 +50,7 @@ mod shim { #[cfg(target_pointer_width = "64")] mod shim { - use core::{ffi::c_char, mem::size_of}; use object::{elf::*, read::elf::ElfFile64, NativeEndian}; - pub type Dyn = Dyn64; pub type Rel = Rel64; pub type Rela = Rela64; @@ -56,9 +58,6 @@ mod shim { pub type FileHeader = FileHeader64; pub type ProgramHeader = ProgramHeader64; pub type ElfFile<'a> = ElfFile64<'a, NativeEndian>; - pub type Relr = u64; - - pub const CHAR_BITS: usize = size_of::() * 8; } pub use shim::*;