This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Trouble Reproducing Builds?



Hi,

I have been trying to verify that my builds are reproducible when no source code changes. I am using the coffdiff tool and it always says the following:

C:\>coffdiff file1.out rebuild_file1.out ofd55
Processing file1.out ...
Processing
rebuild_file1.out ...
Comparing files ...

Build attributes are not compared yet ... coming soon.
============================================================
Comparing Sections
============================================================
Raw data in section .vers is different

Files are different

The map files are exactly the same except the link time at the top of the file. The .out files sizes are slightly different and when I run the .out files through the hex55 I find slight differences. So I am concerned.

What is the best way to verify you can rebuild the code repeatably (bit for bit)?

I am using C55X CGT 4.3.1 and the 2.20.00 cg_xml utilities.

Thanks.

  • The objdiff utility is a better one to use to compare COFF/ELF files. coffdiff is an older tool and the implementations of the two are quite different. A related thread that might be helpful: http://e2e.ti.com/support/development_tools/compiler/f/343/p/71617/261639.aspx#261639

    If the .vers section is a copy section it is not loaded on to the target, so a difference there can probably be ignored. This wiki article explains what a COPY section is:
    http://processors.wiki.ti.com/index.php/Linker_Special_Section_Types#COPY_Sections

  • I suspect .vers contains a time stamp.  Run objdiff with -v and it will dump out the raw values of the bytes that are different.  It is a good guess those raw values are in the range of ASCII characters, and you can map those raw values back to characters to see what it spells.  (I have thought about adding that feature to objdiff.)  

    One workaround to consider ...  You can configure objdiff to skip sections, like .vers, by name.  Read about it in the cg_xml documentation.  Point your web browser at the file index.htm in the root directory of the cg_xml installation.

    Thanks and regards,

    -George

  • OK I am still getting different behavior between builds. I verified that the .out files are the same with only date/time characters being different in the .vers section USING OBJDIFF. HOWEVER when I run the .out files through the HEX55.EXE tool. I get thousands of differences that I can not explain.

    Here is my hex55 .cmd file below:

    -boot
    -v5510:2
    -memwidth 8           
    -reg_config 0x1c00,0x2510       
    -delay 0x200                 
    -reg_config 0x0800,0x0000       
    -reg_config 0x0801,0xFFFF        
    -reg_config 0x0803,0x132A      
    -reg_config 0x0804,0x032A                                        
    -reg_config 0x0805,0x0000       
    -reg_config 0x0806,0x1059      
    -reg_config 0x0807,0x005A       
    -reg_config 0x0808,0x0000
    -reg_config 0x0800,0x0020       
    -reg_config 0x0812,0x0FFF
    -e _c_int00
    -b


  • Please show me one difference that at least seems to be typical of the 1000.  Let's see if we can explain it.

    Thanks and regards,

    -George

  • Hi George,

    I am not sure if this is what you want but here is the first difference between the binary files and it is consecutive until 0xEA91. My binary is about 206 KBytes. We are using a 5510. I did not take the time to analyze the differences. At one point we thought the hex55 tool was moving sections around in the binary but never pursued it...It may be producing equivalent load behavior I just do not know.

    This may not be the reason I am seeing differences in behavior between builds. I thought I nipped it with the objdiff validation and this just threw me for a loop.

    Please let me know if I can provide any more information.

    0000003A: 01 02
    0000003B: 00 F8
    0000003D: 02 00
    0000003E: 7F BC
    0000003F: 00 44
    00000040: CA 00
    00000041: 02 08
    00000042: 66 00
    00000043: FF 15
    00000044: 5E FF
    00000045: 80 FC
    00000046: 5F FF
    00000047: 80 8B
    00000048: EA FE
    00000049: 02 FA
    0000004A: 66 FF
    0000004B: FF 27
    0000004C: 5E 00
    0000004D: 80 BF
    0000004E: 5F 02
    0000004F: 80 B8
    00000050: EA 02
    00000051: 02 56
    00000052: 46 FE
    00000053: 2D 06
    00000054: 5E F8
    00000055: 80 E8
    00000056: 5F FA
    00000057: 80 24
    00000058: EA 06
    00000059: 02 A2
    0000005A: 46 1A
    0000005B: 2D 71
    0000005C: 5E 29
    0000005D: 80 A7
    0000005E: 5F 29
    0000005F: 80 A7
    00000060: EA 1A
    00000061: 02 71
    00000062: 46 06
    00000063: 2D A2
    00000064: 5E FA
    00000065: 80 24
    00000066: 5F F8
    00000067: 80 E8
    00000068: EA FE
    00000069: 02 06
    0000006A: 3E 02
    0000006B: 3A 56
    0000006C: 5E 02
    0000006D: 80 B8
    0000006E: 5F 00
    0000006F: 80 BF
    00000070: EA FF
    00000071: 02 27
    00000072: 46 FE
    00000073: 2D FA
    00000074: 5E FF
    00000075: 80 8B
    00000076: 5F FF
    00000077: 80 FC
    00000078: EA 00
    00000079: 02 15
    0000007A: 46 00
    0000007B: 2D 08
    0000007C: 5E 00
    0000007D: 80 06
    0000007E: 5F 00
    0000007F: 80 04
    00000080: EA FF
    00000081: 02 F0
    00000082: 41 FF
    00000083: 10 C3
    00000084: 5E FF
    00000085: 80 88
    00000086: 5F FF
    00000087: 80 63
    00000088: EA FF
    00000089: 02 82
    0000008A: 3E FF
    0000008B: 56 F8
    0000008C: 5E 00
    0000008D: 80 99
    0000008E: 5F 01
    0000008F: 80 01
    00000090: EA 00
    00000091: 02 CA
    00000092: 46 FF
    00000093: 2D E0
    00000094: 5E FE
    00000095: 80 B5
    00000096: 5F FE
    00000097: 80 1B
    00000098: EA FE
    00000099: 02 C2
    0000009A: 46 00
    0000009B: 2D A2
    0000009C: 5E 02
    0000009D: 80 B5
    0000009E: 5F 03
    0000009F: 80 6E
    000000A0: EA 01
    000000A1: 02 B2
    000000A2: 46 FD
    000000A3: 2D DF
    000000A4: 5E FA
    000000A5: 80 13
    000000A6: 5F F9
    000000A7: 80 57
    000000A8: EA FD
    000000A9: 02 F7
    000000AA: 46 07
    000000AB: 2D EB
    000000AC: 5E 14
    000000AD: 80 5C
    000000AE: 5F 1E
    000000AF: 80 B0
    000000B0: EA 22
    000000B1: 02 B1
    000000B2: 3E 1E
    000000B3: 79 B0
    000000B4: 5E 14
    000000B5: 80 5C
    000000B6: 5F 07
    000000B7: 80 EB
    000000B8: EA FD
    000000B9: 02 F7
    000000BA: 46 F9
    000000BB: 2D 57
    000000BC: 5E FA
    000000BD: 80 13
    000000BE: 5F FD
    000000BF: 80 DF
    000000C0: EA 01
    000000C1: 02 B2
    000000C2: 46 03
    000000C3: 2D 6E
    000000C4: 5E 02
    000000C5: 80 B5
    000000C6: 5F 00
    000000C7: 80 A2
    000000C8: EA FE
    000000C9: 02 C2
    000000CA: 46 FE
    000000CB: 2D 1B
    000000CC: 5E FE
    000000CD: 80 B5
    000000CE: 5F FF
    000000CF: 80 E0
    000000D0: EA 00
    000000D1: 02 CA
    000000D2: 46 01
    000000D3: 2D 01
    000000D4: 5E 00
    000000D5: 80 99
    000000D6: 5F FF
    000000D7: 80 F8
    000000D8: EA FF
    000000D9: 02 82
    000000DA: 3E FF
    000000DB: 9C 63
    000000DC: 5E FF
    000000DD: 80 88
    000000DE: 5F FF
    000000DF: 80 C3
    000000E0: EA FF
    000000E1: 02 F0
    000000E2: 3E 00
    000000E3: A3 04
    000000E4: 5E 00
    000000E5: 80 06
    000000E6: 5F FF
    000000E7: 80 FB
    000000E8: EA 00
    000000E9: 02 05
    000000EA: 3E 00
    000000EB: AA 12
    000000EC: 5E 00
    000000ED: 80 29
    000000EE: 5F 00
    000000EF: 80 48
    000000F0: EA 00
    000000F1: 02 6C
    000000F2: 46 00
    000000F3: 2D 8D
    000000F4: 5E 00
    000000F5: 80 A2
    000000F6: 5F 00
    000000F7: 80 A2
    000000F8: EA 00
    000000F9: 02 86
    000000FA: 46 00
    000000FB: 2D 50
    000000FC: 5E 00
    000000FD: 80 06
    000000FE: 5F FF
    000000FF: 80 B7
    00000100: EA FF