Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Binary Comparisons

I want to compare two version of compiled/linked software, where the only changes are the values of two constants. But when I perform a binary compare, the results show thousands of differences, rather just a couple of words that are different.

Does anybody know why this is so?

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Do You mean you're comparing .sof files? Or processor binary .elf files?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Actually, the files I am trying to compare are .srec files we get from the developer of the software. Regardless, they are hexidecimal text files and a binary compare does show there are differences. My problem is that only two 16-bit constants were changed, then all the files were recompiled and linked into the .srec file. My only guess is that the constant got replaced in lots of code during the compilation/linkage phases causing massive changes in the resulting .srec file. Does that sound right?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It depends on how and where those constants were used, but they could also have triggered different optimisations from the compiler, resulting in very different code.