1

I've been working on a project on an IBM POWER8 system. I'd like to translate some very simple binaries from x86-64 to PPC.

Is there a tool that can either:

  1. Translate the binary from x86-64 to PPC (similar to how Apple Rosetta did PPC to x86-64)
  2. Decompile the x86-64 binary into C code (doesn't need to be human readable) so that I can recompile it on a PPC system

I'd love to know if there's any other way to get that done as well.

EDIT: Also, I'm not comfortable using commercial software, but am okay with closed-source.

Thanks!

  • 1
    To the person who downvoted, I'd love to know why and learn from that. Thanks. – TajyMany Feb 18 '18 at 21:47
3

For 1, there is QEMU which can be built for PPC and supports i386 and x86-64 emulation. If you run Linux, there may already be a precompiled package available for your distro.

For 2, there are some decompilers which can produce C pseudocode from x86-64 binaries. Alternatively, tools like McSema can perform lifting to LLVM bitcode which can then be recompiled to PPC (in theory).

  • Thanks for your answer! With QEMU, I can see that User-Mode Emulation would allow me to run that binary on PPC. However, is there software that actually "translates" the binary itself to run natively on PPC? Also, sorry I didn't state this in the answer, but McSema uses commercial software, which I can't use. Are there any alternatives to this? Thanks again! – TajyMany Feb 18 '18 at 22:14
  • if you want to have completely independent native PPC binaries you'll have to go with option 2. Note that Rosetta worked like QEMU - it ran unmodified binaries via emulation. – Igor Skochinsky Feb 19 '18 at 12:42
  • Alright, thanks! Do you know any resources that would help me get that emulation setup? Again, I don’t want to install an operating system emulating PowerPC, but I want to run an emulated PowerPC program. I can’t find too many resources online for that. – TajyMany Feb 19 '18 at 13:27
  • wait, first you ask about emulating x86 on PPC and now the other way around? Ask on superuser.com or something, this does not seem related to RE. – Igor Skochinsky Feb 19 '18 at 18:11
  • Sorry was confused, was leaving for a flight; meant I don’t want an OS emulating x86, but instead emulating an x86 program on PPC – TajyMany Feb 19 '18 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.