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.

Partial linking with CGTools version 7.0.1



Hi,   

    Need some help in using partial linking with cgtools 7.0.1 

We are migrating to CGtools v7.0.1 from v6.0.8, but facing a issue in partial linking with new tools.

For every function listed in the partial linking cmd file, we get a linker warning aswarning: no matching section“

 

In our codec we have two steps for linking as below: 

(i). cl6x -z -r -o $(Proj_dir)\dec_alg.o64 $(Proj_dir)\C64XPLUS\*.obj

(ii). cl6x -z -o $(Proj_dir)\ C64XPLUS\dec_plink.l64P  -m $(Proj_dir)\ C64XPLUS\dec_plink.map dec_plink_lib.cmd

 

In step (ii), dec_alg.o64 file is specified as input in the partial link command file dec_plink_lib.cmd. 

But for each function line in dec_plink_lib.cmd as below, we get the warning "no matching section" even though the sections like .text:_func1 are present in the dec_alg.o64 file.

 .text:dec_cSect1
 {
        *(.text:_func1)
        *(.text:_func2)

        ....

}

 

These steps work with older CG tools without any warning. 

We are using CCS 3.3 with SR11 patch, building the library for DM6446.

 

Any suggestions? Have we missed anything?

 

Thanks,

Prasad

  • Prasad,

    This is a known bug. The bug number is SDSCM00035445 and you can track it here.

    Essentially the problem is that during the partial link, the linker is collecting .text:_func1 into the .text section. This should not happen, since you did not provide a linker command file for your partial link.

    The 6.0.x linker did have an unspecified behavior, if you specified a linker command file during a partial link with something like:

    .text {} > P_MEM

    It would still not collect .text:_func1 into .text. The newer linker will collection .text:_func1 into .text in this case. This will remain the behavior of the new linker.

    You can workaround the issue by providing a linker command file during the partial link that creates the output sections .text:func1 and .text:func2.  The bug fix is available in the 6.1.14 linker as well as the 7.1.0B1 linker.

  • Thanks for the clarification!

    We are now able to link without any warnings by implementing a workaround similar to the one suggested.

    We omitted the first step of creating intermediate .o64 file. This way the linker is able to find the correct sections .text:_func1etc from the obj file itself.