Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing 2 object code files

Status
Not open for further replies.

CCprog

Programmer
Feb 6, 2003
2
US
Hi,
I took 2 exactly same C files, gave a diff name to each

eg. of C code.
main()
{
int i,j,k=0;
for(i=0;i<10;i++)
for(j=0;j<10;j++)
k++;
return 0;
}

now i compiled these with &quot;cc -c&quot; option and compared the obj files with &quot;diff&quot; and &quot;cmp&quot; utilities in linux and i got different answers.

what can be the reason for this?

thanks
 
were both files compiled with the same compiler? if different each compiler adds on its own baggage that is different to the other.

maybe on of your programs may have a bug?

how were the answers different?

straiph &quot;There are 10 types of people in this world, those who know binary and those who don't!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top