[talk] Comparing Executables

Christos Zoulas christos at zoulas.com
Tue Oct 6 12:00:36 EDT 2015


On Oct 6,  9:26pm, kmsujit at gmail.com (Sujit K M) wrote:
-- Subject: Re: [talk] Comparing Executables

| Hi Okan,
| 
| On Tue, Oct 6, 2015 at 9:22 PM, Okan Demirmen <okan at demirmen.com> wrote:
| > On Tue, Oct 6, 2015 at 11:37 AM, Sujit K M <kmsujit at gmail.com> wrote:
| >> Hi All,
| >>
| >> I was of the opinion that all files including executables can be renamed.
| >> Hoping this is true, Is there a sleek way in UNIX to find if the two files are
| >> the same. One thing that comes to my mind is to write a program in C to
| >> read both the binaries and comparing. The other simpler alternative is to
| >> use scripting, I don't think we will be stretched to use Python Or Perl.
| >> But Awk/Sed etc.
| >>
| >> Would love to get a feedback.
| >
| > fdupes exists, or do it yourself with a similar methodology.
| 
| fdupes seems to more useful comparing non executable files. What I am
| looking for
| is the below scenario.
| 
| Say you compile an executable with -o flag and -g flag the executable produced
| is the same application but are different if you compare with say diff.

You mean with -O and without -O and with -g? These will produce
different code/binaries... But if you compile with "-O -g" and "-O"
alone you should be able to use objdump --disassemble to compare.

christos




More information about the talk mailing list