mirror of
https://github.com/radareorg/r2ghidra.git
synced 2026-11-07 06:25:57 -10:00
Fixes for the dalvik sleigh
This commit is contained in:
1 parent
019cd9dfe9
commit
88843ae9ff
3 files changed
+25
-4
No files matched your search
+2
-2
@@ -14,7 +14,7 @@ purge: clean
|
||||
$(MAKE) uninstall
|
||||
$(MAKE) user-uninstall
|
||||
|
||||
ghidra-processors.txt:
|
||||
ghidra-processors.txt: ghidra-processors.txt.default
|
||||
cp -f ghidra-processors.txt.default ghidra-processors.txt
|
||||
|
||||
asan: ghidra-processors.txt
|
||||
@@ -48,7 +48,7 @@ mrproper: clean
|
||||
rm -rf subprojects/pugixml
|
||||
rm -rf subprojects/zlib
|
||||
|
||||
r2ghidra_sleigh.zip dist:
|
||||
r2ghidra_sleigh.zip dist: ghidra-processors.txt
|
||||
rm -rf tmp && mkdir -p tmp
|
||||
$(MAKE) -C ghidra user-install DH=$(shell pwd)/tmp/r2ghidra_sleigh-$(VERSION)
|
||||
cd tmp && zip -r ../r2ghidra_sleigh-$(VERSION).zip *
|
||||
|
||||
+2
-2
@@ -121,7 +121,7 @@ GHIDRA_SLEIGH_FILES=$(GHIDRA_SLEIGH_HOME)/*.cspec
|
||||
GHIDRA_SLEIGH_FILES+=$(GHIDRA_SLEIGH_HOME)/*.ldefs
|
||||
GHIDRA_SLEIGH_FILES+=$(GHIDRA_SLEIGH_HOME)/*.pspec
|
||||
|
||||
../ghidra-processors.txt:
|
||||
../ghidra-processors.txt: ../ghidra-processors.txt.default
|
||||
cp -f ../ghidra-processors.txt.default ../ghidra-processors.txt
|
||||
|
||||
sleigh-build: sleighc ../ghidra-processors.txt
|
||||
@@ -129,7 +129,7 @@ sleigh-build: sleighc ../ghidra-processors.txt
|
||||
|
||||
GHIDRA_PROCS=$(GHIDRA_SLEIGH_HOME)/*/*/*
|
||||
|
||||
sleigh-install:
|
||||
sleigh-install: ../ghidra-processors.txt
|
||||
mkdir -p "$(D)"
|
||||
for a in DATA $(shell cat ../ghidra-processors.txt) ; do \
|
||||
for b in cspec ldefs sla pspec ; do \
|
||||
|
||||
@@ -1,4 +1,25 @@
|
||||
diff --git a/src/Processors/Dalvik/data/languages/Dalvik_Base.cspec b/src/Processors/Dalvik/data/languages/Dalvik_Base.cspec
|
||||
index ba8bb33..aa7aee1 100644
|
||||
--- a/src/Processors/Dalvik/data/languages/Dalvik_Base.cspec
|
||||
+++ b/src/Processors/Dalvik/data/languages/Dalvik_Base.cspec
|
||||
@@ -47,13 +47,11 @@
|
||||
<register name="fp"/>
|
||||
<varnode space="register" offset="0x1000" size="0x400"/>
|
||||
</unaffected>
|
||||
- <pcode inject="uponentry" dynamic="true"/> <!-- Dynamically generate p-code to map input to registers -->
|
||||
+ <!-- The native decompiler cannot service Ghidra's Java-side Dalvik dynamic injects. -->
|
||||
</prototype>
|
||||
</default_proto>
|
||||
|
||||
- <callotherfixup targetop="moveRangeToIV">
|
||||
- <pcode dynamic="true"/>
|
||||
- </callotherfixup>
|
||||
+ <!-- Leave moveRangeToIV as an unresolved userop instead of failing on a missing dynamic inject. -->
|
||||
|
||||
</compiler_spec>
|
||||
|
||||
diff --git a/src/decompiler/fspec.cc b/src/decompiler/fspec.cc
|
||||
index d87eb2f..b3a11e5 100644
|
||||
--- a/src/decompiler/fspec.cc
|
||||
+++ b/src/decompiler/fspec.cc
|
||||
@@ -1984,7 +1984,7 @@ int4 ParamActive::whichTrial(const Address &addr,int4 sz) const
|
||||
|
||||
Reference in new issue
Block a user