473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Compare two binary files

I built the same source code, with the same compiler VC++ 6.0 on different machines (same OS: windows 2003). However they produced two "different" executables.

I disassembled two binaries using IDA and fed them into a tool which generated the call graph. I noticed,

1) The call graph are the same;

2) The tool matched all functions in one binary to another, which makes me believe they are actually the 'same' binary file;

3) Interestingly I found, the difference of binary diff lies in the fact that the same functions are put into different linear addresses. It looks that they are shifted by an offset.

For examples, in my two executables cmptree1.exe and cmptree3.exe

The subroutine sub_403550 (linear address 0x00403550) in cmptree1.exe matches sub_403540 in cmptree3.exe (linear address 0x00403540); and the followed subroutines match respectively.

Could some experts please tell me what could cause the difference in the binaries generated from the same source and same compiler?
Apr 1 '08 #1
4 5798
JosAH
11,448 Expert 8TB
I built the same source code, with the same compiler VC++ 6.0 on different machines (same OS: windows 2003). However they produced two "different" executables.
Check all your compiler flags and linker flags; also check the size of your static
libraries (.lib files) that are linked in with your executables.

kind regards,

Jos
Apr 1 '08 #2
weaknessforcats
9,208 Expert Mod 8TB
also check the size of your static
libraries (.lib files) that are linked in
The entire library is not part of the executable. The functions that are needed have been copied to the executable so you need the sizes of these functions.

Also, if the two machines are using the Windows SDK, do both machines have the same version?

Also, is VC++ 6.0 on both machines using the same service packs?
Apr 1 '08 #3
Also, if the two machines are using the Windows SDK, do both machines have the same version?

Also, is VC++ 6.0 on both machines using the same service packs?
Thanks for the tips.

Do you know how to check the version of Windows SDK?

BTW, we use the same service packs, i.e., VC++ 6.0 + SP5
Apr 5 '08 #4
weaknessforcats
9,208 Expert Mod 8TB
If you locate wht Windows SDK folder, there is a subfolder named with the version.

Mine shows C:\Program Files\Microsoft SDKs\Windows\v6.0A.
Apr 6 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: Eric | last post by:
Assume that disk space is not an issue (the files will be small < 5k in general for the purpose of storing preferences) Assume that transportation to another OS may never occur. Are there...
28
by: wwj | last post by:
void main() { char* p="Hello"; printf("%s",p); *p='w'; printf("%s",p); }
6
by: alice | last post by:
hi all, Can anybody please tell the advantages which the binary files offers over the character files. Thanks, Alice walls
4
by: knapak | last post by:
Hello I'm a self instructed amateur attempting to read a huge file from disk... so bear with me please... I just learned that reading a file in binary is faster than text. So I wrote the...
10
by: Fabuloussites | last post by:
I'm considering deploying an application that will us an IP address locaiton database provided by Ip2location.com... http://www.ip2location.net/ip2location-dotnet-component.aspx their .net...
8
by: dagecko | last post by:
Hi I would like to know how to detect if a file is binary or not. It's important for me but I don't know where to start. Ty
10
by: joelagnel | last post by:
hi friends, i've been having this confusion for about a year, i want to know the exact difference between text and binary files. using the fwrite function in c, i wrote 2 bytes of integers in...
15
by: JoeC | last post by:
I am writing a program that I am trying to learn and save binary files. This is the page I found as a source: http://www.angelfire.com/country/aldev0/cpphowto/cpp_BinaryFileIO.html I have...
3
by: masood.iqbal | last post by:
Hi, Kindly excuse my novice question. In all the literature on ifstream that I have seen, nowhere have I read what happens if you try to read a binary file using the ">>" operator. I ran into...
9
by: deepakvsoni | last post by:
are binary files portable?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.