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.

Linker Warning

Other Parts Discussed in Thread: CCSTUDIO

In my DSP/BIOS application I call CLK_gethtime() and get to following linker warning:

warning: conservatively using trampoline for call destination "CLK_F_gethtime";
   generation and use of this trampoline can potentially be avoided if the
   --symbol_map option is used to re-direct symbol references instead of using
   symbol assignments

I don't really understand what the problem is. How can I avoid this?

I'm using CGT 6.1.9 together with DSP/BIOS 5.33.04.

Robert

  • Here is the explanation of what is happening:

    Your code (or code auto-generated by BIOS) is calling a function named CLK_F_gethtime. There is no ordinary function of that name. Instead, there is a statement in the BIOS auto-generated link command file similar o "CLK_F_gethtime=real_function;". At the time the linker processes the relocations associated with calls to CLK_F_gethtime, it doesn't know that the true destination is real_function, and so it conservatively generates a trampoline to guarantee that the branch reaches the destination. A better alternative to that assignment is the new option --symbol_map=CLK_F_gethtime=real_function. Using --symbol_map gives the linker the critical information earlier, and allows it to avoid the trampoline in most cases.

    So, right click on your project, select Build Options, select the Linker tab, and add the following command to the box:

    --symbol_map=CLK_F_gethtime=real_function

    The DSP/BIOS and Linker teams are aware of the warning and are investigating it. This does not affect functionality. 

    For reference, please see page this page for a good explanation on trampolines:

    http://tiexpressdsp.com/index.php?title=Code_Generation_Tools_FAQ#Q:_What.27s_the_benefit_of_using_near_calls_.2B_linker_trampolines_.v._all-far-calls.3F

  • Hi

    Build tools v6.1.12

    When I added

    --symbol_map=CLK_F_gethtime=real_function

    I get the error

    [Linking...] "C:\Program Files\Texas Instruments\C6000 Code Generation Tools 6.1.12\bin\cl6x" -@"Debug.lkf"
    <Linking>

     undefined      first referenced                                                                 
      symbol            in file                                                                      
     ---------      ----------------                                                                 
     CLK_F_gethtime C:/CCStudio_v3.3/bios_5_33_06/packages/ti/bios/lib/biosC6000.a64<clk_gethtime.o64>

    error: unresolved symbols remain
    error: errors encountered during linking; "./Debug/nvsvivo.out" not built

    >> Compilation failure

     

    Without the "--symbol_map....", it compiles and links (and runs) OK.[:Y]

    So it looks like I can't use the "--symbol_map..." option?

    Cheers

     

     

  • Did you get the same exact warning before using symbol_map?

    What processor are you using?

    What version of DSP/BIOS are you using?

  • Hi

    I get the same warning the Robert posted on Mon, May 4 2009 8:02 AM  (first post).

    DM648 is the processor.


    BIOS 5.33.06

    CGT v6.1.12

    Cheers

  • I know this is an ancient thread, I have fixed the problem in my project.  The "real function" in this case is CLK_F_getshtime, as given in the tconf generated file "*cfg.cmd".  I found this by running grep on all of the files searching for "CLK_F_gethtime".

    Grep returned:

    gen4cfg.cmd:        CLK_F_gethtime = CLK_F_getshtime;

    so I added "--symbol_map=CLK_F_gethtime=CLK_F_getshtime" near the beginning of the linker script.