You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
664 B
Rust

use std::path::PathBuf;
use crate::common::{Lazy, Symbol};
use crate::error::Error;
use crate::linker::Linker;
mod object;
mod output;
mod loadable;
use elf_utilities::file::ELF64;
pub use object::*;
pub use output::*;
impl Linker<ElfObject, ElfOutput> {
// shortcut to avoid turbofish
pub fn elf(destination: PathBuf) -> Result<Self, Error> {
Ok(Self::new(ElfOutput::new(destination)?))
}
}
impl<'data> Lazy<&'data str, ELF64> for Symbol<'data> {
fn value(&self, _src: &ELF64) -> Result<&'data str, Error> {
Err(Error::InvalidSectionData) // TODO
}
fn resolved(&self) -> bool {
self.str_ref.is_some()
}
}