From mboxrd@z Thu Jan 1 00:00:00 1970 From: P Costello To: help-gcc@gnu.org Subject: Comparing binaries in Source Code space Date: Fri, 31 Mar 2000 06:52:00 -0000 Message-id: <381827635.954514321065.JavaMail.root@web32.pub01> X-SW-Source: 2000-03/msg00124.html 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: P Costello To: help-gcc@gnu.org Subject: Comparing binaries in Source Code space Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <381827635.954514321065.JavaMail.root@web32.pub01> X-SW-Source: 2000-q1/msg00434.html Message-ID: <20000401000000.Rk2D5R5ydXLffrCGuk7JaA_dx_5aR-mRViia0eMOOQ8@z> 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