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.

Compiler/TMS320C6678: Compiler version and option in linked DWARF information

Part Number: TMS320C6678

Tool/software: TI C/C++ Compiler

Hi,

There is a way to store the compilation options in the DWARF compilation unit attributes, as GCC does?

In the .obj there is only the compiler version while in the executable the C66 linker replace DW_AT_producer with the linker version.

  • I'll be happy to file an enhancement request for you.  But before I do, I need a better understanding of the problem you need to solve.

    For instance, the build attributes are in the object file. They don't contain every build option.  But the keys ones are there.  One way to see them is with the utility ofd6x ...

     Build Attributes in ".c6xabi.attributes"
    
        Format Version:  'A'
    
        <0>  Vendor Name:  "TI" (Texas Instruments, Inc.)
    
             Tag_File:
                Attributes:
                 Tag_Producer_Name        Assembler
                 Tag_Producer_VMajor      9          (Producer Major Version + 1)
                 Tag_Producer_VMinor      2          (Producer Minor Version + 1)
                 Tag_Producer_VPatch      3          (Producer Patch Version + 1)
                 Tag_ISA                  10         (C6600)
                 Tag_ABI                  2          (EABI)
                 Tag_Long_Precision_Bits  2          (32-bit long type)
                 Tag_Bitfield_layout      2          (compatible with any bitfield layout)
                 Tag_ABI_enum_size        3          (no enums that affect object file compatibility are used)
                 Tag_Tramps_Use_SOC       1          (use of registers B30,B31 allowed in trampolines)
    
        <1>  Vendor Name:  "c6xabi" (ABI for the Texas Instruments C6000 Architecture)
    
             Tag_File:
                Attributes:
                 Tag_ISA          10  (C6600)
                 Tag_ABI_wchar_t  1   (wchar_t size is 2)

    Why is this insufficient?  What more do you need, and why do you need it?

    Thanks and regards,

    -George

  • Hi,

    I happened to link with a library build with a different compiler (minor) version or forget to reset a compilation option temporary modified for testing purpose.

    So I think can be nice to have a way to check the CGT version consistency of an exe and having also the compilation option available.
  • Alberto Chessa said:
    So I think can be nice to have a way to check the CGT version consistency of an exe

    Is the information shown in the build attributes good enough for this purpose?

    Alberto Chessa said:
    and having also the compilation option available.

    I can file an enhancement request which asks for all the build options to somehow be stored in the object file.  I'll let the experts decide the best way to do that.  How does this sound?

    Thanks and regards,

    -George

  • Hi,

    .c6xabi.attributes, together with with DWARF DW_TAG_compile_unit/DW_AT_producer, seem to be enough to check for CGT consistency.

    George Mock said:

    I can file an enhancement request which asks for all the build options to somehow be stored in the object file.  I'll let the experts decide the best way to do that.  How does this sound?

    Its Ok, It will be nice to have info store in standard DWARF DW_TAG_compile_unit attributes as GCC does or maybe using a vendor specific extensions. As GCC, is enough to have only the non default options.

  • I filed CODEGEN-3709 in the SDOWP system.  This is not a bug, but requests the compiler be changed so that it puts the version number, and build options, in the Dwarf information similar to how GCC does.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George