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.

debug sections different even when built on the same machine with same tools

Champs,

        When i build binaries on the same machine with the same set of tools in the same path i see the debug sections are different.

        Though this might not cause any run time issues, or ignorable differences, Would like to get more understading on why this would happen, thought i could use generaic binary file compare utility to compare the two generated files & ensure they are same.

        The differences are similar as below

binary1:

F:\\temp\\0444811:$C$L136:1:1295337633Ipc.c.........

binary2:

F:\\temp\\1006811:$C$L136:1:1295339537Ipc.c........

        Any reason why these temporary directories being used & why these are getting embedded in the target binary.

        - This causes size difference in the generated binary.

Best Regards,

Velan

  • You are seeing two different aspects of compiler implementation come together in a way that you may not expect.

    One ... The compiler generates an object file from C code in multiple phases.  One of the intermediate steps is an assembly file.  Commonly, this assembly file is created in a temporary directory, immediately assembled to an object file, and then deleted.

    Two ... The assembler always encodes the path and name of the assembly file in the debug information portion of the object file.  This is done regardless of whether the assembly file is a compiler temporary file or a user written file.

    This difference should be ignored in your comparison.  But a simple whole file compare can't do that.  A utility named objdiff in the cg_xml package does ignore such differences by default.

    Thanks and regards,

    -George

  • George,

    Thanks, this helps

    Best Regards

    Velan