mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-09 13:37:55 +00:00
Version 0.2.2
- Add application icon - Fixes for objects containing multiple sections with the same name
This commit is contained in:
@@ -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(§ion.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() {
|
||||
|
||||
Reference in New Issue
Block a user