test data

This commit is contained in:
nora 2023-02-12 13:45:51 +01:00
parent 94a6a0e999
commit 5de9ea38ca
7 changed files with 85 additions and 14 deletions

View file

@ -56,7 +56,7 @@ define_idx! {
}
/// A raw ELF. Does not come with cute ears for now.
#[derive(Debug)]
#[derive(Debug, Clone, Copy)]
pub struct Elf<'a> {
pub data: &'a [u8],
}
@ -153,6 +153,12 @@ impl Debug for SymInfo {
}
}
impl Display for SymInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?},{:?}", self.r#type(), self.binding())
}
}
#[derive(Debug, Clone, Copy, Zeroable, Pod)]
#[repr(C)]
pub struct Rel {