mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2256 avoid ELF PLT disassembly when alternate instruction set exists
This commit is contained in:
parent
47cda95669
commit
dd917fba7a
1 changed files with 7 additions and 3 deletions
|
@ -18,6 +18,7 @@ package ghidra.app.util.bin.format.elf;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import ghidra.app.cmd.refs.RemoveReferenceCmd;
|
import ghidra.app.cmd.refs.RemoveReferenceCmd;
|
||||||
|
import ghidra.app.util.PseudoDisassembler;
|
||||||
import ghidra.program.disassemble.Disassembler;
|
import ghidra.program.disassemble.Disassembler;
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.program.model.data.*;
|
import ghidra.program.model.data.*;
|
||||||
|
@ -470,10 +471,13 @@ public class ElfDefaultGotPltMarkup {
|
||||||
TaskMonitor monitor) throws CancelledException {
|
TaskMonitor monitor) throws CancelledException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Disassemble section.
|
// Disassemble PLT section.
|
||||||
// Disassembly is only done so we can see all instructions since many
|
// Disassembly is only done so we can see all instructions since many
|
||||||
// of them are unreachable after applying relocations
|
// of them are unreachable after applying relocations. Avoid disassembly
|
||||||
disassemble(minAddress, maxAddress, program, monitor);
|
// when alternate instruction sets exist.
|
||||||
|
if (!PseudoDisassembler.hasLowBitCodeModeInAddrValues(program)) {
|
||||||
|
disassemble(minAddress, maxAddress, program, monitor);
|
||||||
|
}
|
||||||
|
|
||||||
// Any symbols in the linkage section should be converted to External function thunks
|
// Any symbols in the linkage section should be converted to External function thunks
|
||||||
// This can be seen with ARM Android examples.
|
// This can be seen with ARM Android examples.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue