Version 0.2.2

- Add application icon
- Fixes for objects containing multiple
  sections with the same name
This commit is contained in:
2022-12-10 10:34:03 -05:00
parent d1d6f1101b
commit 7219e72acf
12 changed files with 92 additions and 38 deletions

View File

@@ -9,7 +9,7 @@ use object::{
R_PPC_EMB_SDA21, R_PPC_REL14, R_PPC_REL24,
},
Architecture, File, Object, ObjectSection, ObjectSymbol, RelocationKind, RelocationTarget,
SectionKind, Symbol, SymbolKind, SymbolSection,
SectionIndex, SectionKind, Symbol, SymbolKind, SymbolSection,
};
use crate::obj::{
@@ -192,9 +192,7 @@ fn relocations_by_section(
obj_file: &File<'_>,
section: &mut ObjSection,
) -> Result<Vec<ObjReloc>> {
let obj_section = obj_file
.section_by_name(&section.name)
.ok_or_else(|| anyhow::Error::msg("Failed to locate section"))?;
let obj_section = obj_file.section_by_index(SectionIndex(section.index))?;
let mut relocations = Vec::<ObjReloc>::new();
for (address, reloc) in obj_section.relocations() {
let symbol = match reloc.target() {