mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-12 22:56:19 +00:00
Add data info for superh (#198)
* Add data info for superh * fmt * Fetch symbol data dynamically from resolved.section * Remove unused var --------- Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
@@ -109,6 +109,11 @@ impl Section {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn symbol_data(&self, symbol: &Symbol) -> Option<&[u8]> {
|
||||
let offset = symbol.address.checked_sub(self.address)?;
|
||||
self.data.get(offset as usize..offset as usize + symbol.size as usize)
|
||||
}
|
||||
|
||||
// The alignment to use when "Combine data/text sections" is enabled.
|
||||
pub fn combined_alignment(&self) -> u64 {
|
||||
const MIN_ALIGNMENT: u64 = 4;
|
||||
|
||||
Reference in New Issue
Block a user