Binary Comparision

Hi Folks,

Is there any way to compare the binaries which are built in AIX (5.3.0) environment?

Thanks in advance.

MKR

Have you tried:

cmp file1 file2

On top of Don's suggestion, you may want to consider one of the various hex or octal dump commands (hexdump, od) to convert the binaries and then compare those dumps.

I am not sure why you would want to compare two binaries specifically. Generally, they just run. The complete story from IBM marketing pages

Core snips:

AIX 7 is designed so that applications created on AIX 6 and AIX 5L can  be executed on AIX V7 without
recompilation. AIX 7 is planned to support  POWER7�, POWER6�, POWER5�, POWER4�,
and PPC970 processor systems that  implement the Power Architecture platform reference architecture.

and

Restrictions on binary compatibility
As stated earlier, binary compatibility on any platform requires that application use only portable
programming techniques such as only using  published interfaces and avoiding programming techniques
that are  processor or AIX release specific.
AIX does not support the execution of binaries created on later  releases or technology levels of AIX
on an earlier release or technology  level of AIX. For example, execution of binaries created on the
AIX  V7.1 operating system (OS) would not be supported on a system running  AIX V6.1 OS.

Simply put - applications that use shared libraries for system calls AND are compiled at same or older/previous level of AIX are expected to run as is.
Note: for optimal performance recompiling can (read will) make a difference for CPU intensive applications.

Depending on what you are interested in there is also the following commands:

dump displays the content of a binary (loader section, strings, object file header, ....)

what display version information

dbx IBMs debugger

kdb kernel debugger, also used to analyse system dumps

I hope this helps.

bakunin