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.

rebuild ''DM6446 dvsdk combos ...'' failed



We use DM6446 board with dvsdk_2_00_00_22 which included codec_engine_2_23_01 and

DM6446_dvsdk_combos_2_05  (video codec/decodec for DSP). We are needed

to rebuild DM6446_dvsdk_combos_2_05, but we failed. As result  we had a lot of

error messages like below:

--------------------------------------------------------------------------------------------------------------------
>>   error: relocation overflow occurred at address 0x00000278 in section
            '.text' of input file 'node_exec.o64P
(/......../dvsdk_2_00_00_22/codec_engine_2_23_01/packages/ti/sdo/ce/node/lib/release/node.a64P)'. 
The 29-bit PC-relative displacement 471144648 at this location is too large to fit into the 21-bit PC-Relative field;
the destination address is too far away from the instruction. You may need to add a mask to the assembly instruction
or use other target specific assembly features if you really only need the lowest 21 bits of this symbol. Please see
the section on Relocation in the Assembly User's Guide.

--------------------------------------------------------------------------------------------------------------------
                       
where instead "node.a64P" there was another library from "codec_engine_2_23_01" and

instead "471144648" there was another 29-bit displacement.

What can we do to successfully rebuild DM6446_dvsdk_combos_2_05 ?



Best Regards,

Eugeny Nickolaychuk
Scientist

  • For the node_exec.o64P failure, I can see by disassembling node_exec.o64P from the CE 2.23.01 release that the particular call that overflowed its displacement is a call to the function _GT_trace().  Therefore, it would seem that the function _GT_trace() was placed in memory too far away from the code that called it.  Since _GT_trace() is called in many places throughout Codec Engine, I would imagine that most of these "21-bit PC-Relative field" errors are a result of that.

    The function _GT_trace() is placed in an output section (linker section) named ".text:__GT_trace".  If there is no explicit placement of this output section then it is placed by the linker into the general ".text" section.  If your .text section is so large that it spans an address range that can't be handled by a 21-bit offset, then there's a chance that a function will be placed too far away from a certain "call site".  Also, if your .text section is allowed to be "split" by the linker, meaning it can span multiple, discontiguous memory areas, then this sort of error can result.

    I wonder if there is anything you can look at to confirm my suspicions?  Is there a .map file produced, even though the link failed?

    Perhaps a more recent version of the linker would help here.  "Newer" (meaning here "not really, really old") linkers have the feature of being able to produce "trampolines", whereby a small piece of code that is reachable by the function caller within the 21-bit offset is created and performs a "far" call to the unreachable function.  In such linkers, and  when not disabled, you will never see these errors.

    Regards,

    - Rob