feat: pub exports of used crates
This commit is contained in:
parent
3fe423c2de
commit
d9452b3ca8
2 changed files with 13 additions and 4 deletions
15
src/lib.rs
15
src/lib.rs
|
@ -1,8 +1,17 @@
|
||||||
pub mod locators;
|
|
||||||
pub mod tricks;
|
pub mod tricks;
|
||||||
|
|
||||||
#[cfg(feature = "rc")]
|
#[cfg(feature = "locator")]
|
||||||
pub mod rc;
|
pub mod locators;
|
||||||
|
pub use elf;
|
||||||
|
pub use proc_maps;
|
||||||
|
pub use libloading;
|
||||||
|
pub use retour;
|
||||||
|
|
||||||
#[cfg(feature = "monitor")]
|
#[cfg(feature = "monitor")]
|
||||||
pub mod monitor;
|
pub mod monitor;
|
||||||
|
pub use tracing_subscriber;
|
||||||
|
|
||||||
|
#[cfg(feature = "rc")]
|
||||||
|
pub mod rc;
|
||||||
|
pub use nix;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ pub fn find_symbol<T : Function>(name: &str) -> Result<Option<T>, Box<dyn Error>
|
||||||
Some((base, path)) => match exec::offset_in_elf(&path, &name)? {
|
Some((base, path)) => match exec::offset_in_elf(&path, &name)? {
|
||||||
None => warn!("could not locate requested symbol in ELF"),
|
None => warn!("could not locate requested symbol in ELF"),
|
||||||
Some(offset) => {
|
Some(offset) => {
|
||||||
let addr : *const () = (base + offset) as *const ();
|
let addr = (base + offset) as *const ();
|
||||||
return Ok(Some(unsafe { Function::from_ptr(addr) } ));
|
return Ok(Some(unsafe { Function::from_ptr(addr) } ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue