Working rel make & more

- Added `elf info`
- Improved `rel info`
- Colored output for `shasum`
- Fix section `rename` in RELs
- Added padding symbols to avoid linker issues
- Automatically set symbols to "active" in .comment output
This commit is contained in:
2023-09-03 10:42:52 -04:00
parent a2374e4fa0
commit f9f7fb2e1e
27 changed files with 1443 additions and 258 deletions

View File

@@ -201,7 +201,11 @@ impl AnalysisPass for FindRelCtorsDtors {
return Ok(());
}
log::debug!("Found .ctors and .dtors: {:?}", possible_sections);
log::debug!(
"Found .ctors and .dtors: {}, {}",
possible_sections[0].0,
possible_sections[1].0
);
let ctors_section_index = possible_sections[0].0;
state.known_sections.insert(ctors_section_index, ".ctors".to_string());
state.known_symbols.insert(SectionAddress::new(ctors_section_index, 0), ObjSymbol {
@@ -311,7 +315,11 @@ impl AnalysisPass for FindRelRodataData {
return Ok(());
}
log::debug!("Found .rodata and .data: {:?}", possible_sections);
log::debug!(
"Found .rodata and .data: {}, {}",
possible_sections[0].0,
possible_sections[1].0
);
let rodata_section_index = possible_sections[0].0;
state.known_sections.insert(rodata_section_index, ".rodata".to_string());