Inputs required in decoding file on AIX- executable (RISC System/6000) or object module not stripped

Hi,

We are in the process of migrating from AIX to Linux. There is a script of type "executable (RISC System/6000) or object module not stripped" on AIX and we are unable to read the contents of it.

Is there a way to read the contents of the file on AIX, so that we can rewrite the code in Linux.

Any pointers would be of great help.

Regards,
Venkatesh.

To get the information you provided (executable (RISC System/6000) or object module not stripped), you had to be able to read its contents (probably using something like the file command). If you're going to try to replace that AIX executable file with an executable file that can be run by your Linux system, you're going to need to understand the difference between "read" and "execute". You can:

  1. Find the source code for the object file you want to convert, modify it to replace any AIX specific code to use code that works on both systems or to use code that is specific to your Linux system, and recompile it on your Linux system.
  2. Contact the vendor that produced the object file you want to run on your Linux system and ask them to provide you a version of that object file that will run on your Linux system.
  3. You can write down specifications describing what that object file does and write code that does that on your Linux system.
  4. You can write an emulator that will run AIX RISC System/6000 code on your Linux system.
  5. Or, you can write down specifications describing what that object file does and hire someone to write code that meets those specifications that will run on your Linux system.

Or, of course, if none of the above are possible and this object file is crucial to your business, you could decide to keep running this object file on AIX instead of on your Linux system.

You might try using the strings command to determine the compiler used to create the file. Then search for a reverse compiler.

This is because there is nothing to read in it. This is a binary file (in the so-called XCOFF-format) and it is most probably the result of a compiler compiling some code written in a normal computer language (C, C++, FORTRAN, or whatever) into an executable file.

If this program (not script) is the result of some in-house development at your site you should be able to find the source code of it somewhere. Use the respective compiler on Linux (mostly gcc , but maybe something else) and compile it there, then you will have a Linux version of the program. (Well, in principle. There are many things that could go wrong, but in theory this will work).

No. You can use the strings -program as suggested to find out more details about the program, but that's it. Even if you succeed in reading the program it won't help you because on Linux you will not need this but a different program (that is: the different output the compiler on Linux will produce from the same source code) todo the same thing on Linux which this program did on AIX.

If you have no access to the source code at all you could try to decompile it (notice that there might be copyright issues involved, clear that first), but this is something you need an expert for and even then it might not succeed at all. Even if it does it will be a complicated process.

I hope this helps.

bakunin