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.

ELF build with -g option is failing

Other Parts Discussed in Thread: CCSTUDIO

Hi,

I am compiling my code with -g (symdebug:dwarf) for ELF format at command line. It is giving linking errors as below

 undefined
                                                    first referenced

  symbol
                                                        in file

 ---------
                                                    ----------------
 __TI_DW.debug_info.$base_types.c93cf708e606cc618cf84dfdfd164667                                                    /Obj/alg_create.oc
 __TI_DW.debug_info.C:/CCStudio_v3.3/framework_components_2_10_01/fctools/packages/ti/xdais/ialg.h.bc8e9c2b216de7cf9de15b0888fbba99    /Obj/alg_create.oc
 __TI_DW.debug_info.C:/CCStudio_v3.3/framework_components_2_10_01/fctools/packages/ti/xdais/xdas.h.d8fb03b4524c15f74d95195955b0485b   /Obj/alg_malloc.oc
 __TI_DW.debug_info.D:/CCSV4/xdctools_3_20_03_63/packages/ti/targets/std.h.ccc034ea41541a395f0b403e568b709b                         /Obj/alg_create.oc

error: unresolved symbols remain
error: errors encountered during linking;

I observe from generated assembly file that it is also compiled with symdebug:dwarf_version=3. I have changed this option to symdebug:dwarf_version=2, and it compiled without any errors.

Interestingly, the same code with same build options, it is successfully compiled in CCSv4. And also the COFF build is compiling proper both in CCS and command line.

Does anyone have any idea why the ELF build is failing? Why there is a difference between CCS and command line?

Thanks,

-Venkat

  • Venkat,

    Which version of compiler did you use for the command line build? From the error, it looks like there might have been a mismatch in debug formats between files in the build.

    Support for Dwarf3 debug format is introduced in v7.0.x codegen tools. If you are using CCS v4.2, the CGT version included with it is 7.0.3. Was the command line build done with the same compiler version?

  • Aarti,

    I am using CCS4.2 and CGT version 7.2 Alpha version.

    I have verified that the build options used for all the files in the build are same. and the build options are same across CCS and command line. But, CCS build is passing and command line build is failing.

    Also, the generated asm from both the builds are same.

    -Venkat

  • Venkat,

    I will send you a friend request so we can start a private conversation to exchange more details and a test case, if needed.