use crate::common::{Lazy, Symbol}; use crate::error::Error; use crate::linker::Linker; use xmas_elf::ElfFile; mod object; pub use object::XElfObject; impl Linker<'_> { // shortcut to avoid turbofish pub fn xelf() -> Self { Self::new(Vec::new()) } } impl<'data> Lazy<&'data str, ElfFile<'data>> for Symbol<'data> { fn value(&self, src: &ElfFile<'data>) -> Result<&'data str, Error> { src.get_string(self.index) .map_err(|e| Error::MissingSectionData(e)) } fn resolved(&self) -> bool { self.str_ref.is_some() } }