This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Comparing binaries in Source Code space


I have two GNU executable objects that should be identical
but are not. They were (we think) made from the same source
and same tools and same command lines. In an attempt to
identify "where" they are different we have done a compare
of the binaries as in:

cmp -l new_command old_command

This yielded many bytes different. The sizes of new_command
anmd old_command are the same. The cmp output shows wide spread but
diffences scattered about. The differences are not due
to an extra byte throwing off the byte-by-byte cmp, but, rather
here and there bytes will be differnt.

A "strings" compare that compares the strings in each
binary yielded differences in true cha]racter strings. But
only because of a built in "date stamp" included in the compile.
So it is not that (since that should be the ONLY difference
as we have compared other compiles and found that to be the case).

What I need is:

1) Given two executables from a GNU compilation that
should be identical (time stamp difference taken into
account)

2) Given a cmp -l outout that shows the byte offset within
the executable "Elf" format file of each byte that is
different along with their values.

3) Given the symbol table exists in the binaries and
the source code is available.

I want to be able to identify what data structure, function,
or code segment where a given byte difference is located. That is:  What is
the closest symbol associated with the byte location
with an ELF format file.

GDB  does not seem to be enough. How can you relate the byte offset within a
binary to the actual code location?


Please send e-mail to  pec@counsellor.com

______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]