ARM: Fix "Combine text sections" confusing code and data (#195)

* ARM: Fix parsing of mapping symbols when "Combine text sections" is enabled

* Add test
This commit is contained in:
LagoLunatic
2025-04-26 13:14:16 -04:00
committed by GitHub
parent 39b1b49985
commit e1c51ac297
7 changed files with 102 additions and 18 deletions

View File

@@ -12,7 +12,7 @@ use crate::{
},
obj::{
InstructionArg, Object, ParsedInstruction, Relocation, RelocationFlags,
ResolvedInstructionRef, ScannedInstruction, Symbol, SymbolFlagSet, SymbolKind,
ResolvedInstructionRef, ScannedInstruction, Section, Symbol, SymbolFlagSet, SymbolKind,
},
util::ReallySigned,
};
@@ -183,6 +183,9 @@ impl DataType {
}
pub trait Arch: Send + Sync + Debug {
// Finishes arch-specific initialization that must be done after sections have been combined.
fn post_init(&mut self, _sections: &[Section], _symbols: &[Symbol]) {}
/// Generate a list of instructions references (offset, size, opcode) from the given code.
///
/// The opcode IDs are used to generate the initial diff. Implementations should do as little