1

we have a old AIX server and it has an executable file and we want to rewrite the same logic of the executable file on linux server, so we are trying to read it but could not find a way to do that.could you please let us know if there is a way to decipher this file

$ file execfile
execfile: executable (RISC System/6000) or object module
fukanchik
  • 2,811
  • 24
  • 29
venkata
  • 447
  • 3
  • 15
  • 1
    possible duplicate of http://stackoverflow.com/questions/16546846/what-is-the-equivalent-command-for-objdump-in-ibm-aix – Jean-François Fabre Sep 04 '16 at 15:13
  • @Jean-FrançoisFabre that solution did not work, please let me know if you heard of any other options – venkata Sep 04 '16 at 21:37
  • maybe you could link to your file, and I could try something. If it works, I'll post an answer with full references of the software used. – Jean-François Fabre Sep 04 '16 at 21:39
  • Not possible. Next time be more careful with your source-programs. – Lorinczy Zsigmond Sep 05 '16 at 05:30
  • @jean-francois Fabre thank-you but I cannot do that, it has lot of confidential information – venkata Sep 06 '16 at 05:53
  • You could compile a simple helloworld with the same toolchain then and share it wirh me. – Jean-François Fabre Sep 06 '16 at 06:34
  • I've noticed Binutils installed on the AIX machines on the [GCC Compile Farm](https://cfarm.tetaneutral.net/). It does an OK job of disassembling COFF executable, but you need to add an arch switch. For example, `/opt/cfarm/binutils-latest/bin/objdump -mpowerpc -Mpwr7 --disassemble blake2s.o | /opt/cfarm/binutils-latest/bin/c++filt`. Also see [How to use AIX disassembler?](https://unix.stackexchange.com/q/392111/56041) on U&L.SE. – jww Nov 21 '18 at 05:58

1 Answers1

0

The IBM RS/6000 has a POWER architecture CPU, possibly a PowerPC 603 or PowerPC 604, or possibly one of the newer models like POWER1, POWER2, POWER3, etc. The most recent (current) systems use POWER7 or POWER8.

Anyway, if the system has the compiler and toolchain installed on it then there should be a decent symbolic debugger included, and you should be able to use that to disassemble any executable. Depending on exactly which version of the OS it was compiled on, and which compiler was used, you might even be able to use PowerPC tools on some other OS, such as MacOS, or even potentially a cross-compiler toolchain on any type of system, to disassemble the program. For example GDB built for PowerPC may be able to disassemble the program.

However if the executable has been stripped of symbols (as was typically the case on AIX systems, IIRC), and especially if it had been run through the most powerful optimizing stage of the compiler, then you'll be pretty much lost and what you are trying to do will be impractical and require many man hours to decipher -- indeed many thousands of man hours for any significantly sized program, even if you're able to hire someone to help who is familiar with the code generation patterns of the particular compiler which was used.

You might be better off trying to hire an archeologist to help you dig through the specific landfill where you might hope to find listings or backup tapes or CDs or disks containing the original source code, or specification documents, etc., for this program. Seriously.

Or try to find and (re-)hire the original author(s).

Greg A. Woods
  • 2,663
  • 29
  • 26