mirror of
https://github.com/encounter/decomp-toolkit.git
synced 2025-12-15 16:16:20 +00:00
Improvements to REL & map support
- Fix symbols.txt align attribute - Fully support nested RARC files & transparent Yaz0 decompression - Guess symbol visibility for maps without link map - Add module name config - Add manual force_active config - Quiet option for shasum - `symbols_known` and `fill_gaps` config - Allow disabling .comment generation per-unit (`comment:0`) - Various minor fixes - Add `rarc` and `yaz0` commands
This commit is contained in:
@@ -172,6 +172,9 @@ impl ObjSection {
|
||||
|
||||
#[inline]
|
||||
pub fn symbol_data(&self, symbol: &ObjSymbol) -> Result<&[u8]> {
|
||||
if symbol.size == 0 {
|
||||
return Ok(&[]);
|
||||
}
|
||||
self.data_range(symbol.address as u32, symbol.address as u32 + symbol.size as u32)
|
||||
}
|
||||
|
||||
|
||||
@@ -329,7 +329,13 @@ impl ObjSymbols {
|
||||
self.at_section_address(section_idx, addr)
|
||||
.filter(|(_, sym)| sym.kind == kind)
|
||||
.at_most_one()
|
||||
.map_err(|_| anyhow!("Multiple symbols of kind {:?} at address {:#010X}", kind, addr))
|
||||
.map_err(|e| {
|
||||
let symbols = e.map(|(_, s)| s).collect_vec();
|
||||
for symbol in symbols {
|
||||
log::error!("{:?}", symbol);
|
||||
}
|
||||
anyhow!("Multiple symbols of kind {:?} at address {:#010X}", kind, addr)
|
||||
})
|
||||
}
|
||||
|
||||
// Iterate over all in address ascending order, excluding ABS symbols
|
||||
|
||||
Reference in New Issue
Block a user