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:
2023-09-05 17:22:22 -04:00
parent f9f7fb2e1e
commit e3857d3212
32 changed files with 975 additions and 366 deletions

View File

@@ -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)
}

View File

@@ -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