rizinorg / rz-ghidra

Deep ghidra decompiler and sleigh disassembler integration for rizin
GNU Lesser General Public License v3.0
804 stars 87 forks source link

"Unable to compile pcode: syntax error" on ppc64le binary #48

Open ruscur opened 4 years ago

ruscur commented 4 years ago

Hi,

Trying to decompile a PowerPC 64 LE binary from r2. The same binary opens and decompiles in Ghidra. I get the following:

Ghidra Decompiler Error: Protomodel : __stdcall: Unable to compile pcode: syntax error

I thought the autodetection could be failing - when I open Ghidra, it shows the lang sleigh as PowerPC:LE:64:A2ALT:default, so I tried setting r2ghidra.lang to that, but the same result occurs.

The binary is just a simple GCC 9 compiled C program (specifically this), but I doubt that matters. I can upload the binary somewhere if it's easier to debug.

Not quite sure what's going on (and why this is only happening in r2 and not Ghidra) so any assistance would be appreciated.

thestr4ng3r commented 4 years ago

The binary is just a simple GCC 9 compiled C program (specifically this), but I doubt that matters. I can upload the binary somewhere if it's easier to debug.

Yes, please share the binary.

ruscur commented 4 years ago

https://russell.cc/static/01.ppc

ELF 64-bit LSB pie executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked, interpreter /lib64/ld64.so.2, for GNU/Linux 3.10.0, BuildID[sha1]=cc29934b26bcb1006d55f94263682ab3f5e5de4a, not stripped

md5sum 89eba418e9a35d4caf9dbebf1e33fedf

XVilka commented 3 years ago

@ruscur could you please upload the binary directly to the GitHub instead? Your link seems broken.

ruscur commented 1 year ago

This should hopefully work. Still having the same issue.

overflow1.zip