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.

C6000-CGT: Retain option doesn't work correctly

Part Number: C6000-CGT

Hello,

We have started using the new CGT 8.3.9 and found that --retain option doesn't work correctly. When I'm using the third form from https://www.ti.com/lit/ug/sprui03b/sprui03b.pdf (8.4.26 Retain Discarded Sections (--retain Option)) then my section isn't retained. I found a workaround for it using wildcards and quotes.

Working:
--retain="*.lib"<printf.obj>(.text)

Not working:

--retain=rts64plus_eabi.lib<printf.obj>(.text)

As far as I know, our last version of CGT was 7.3.8 where everything works fine.

BR,

Mateusz

  • Unfortunately, I am unable to reproduce the issue.  Is your program organized as a CCS project?  If so, please follow the directions in the article Sharing projects to zip up the project, then attach that zip file to your next post.

    Thanks and regards,

    -George

  •  Is your program organized as a CCS project? No, it isn't. But I prepared reproduction with:

    a.cpp:
    int main() {
    return 0;
    }

    cl6x a.cpp -mv6600 -O3 -z --map_file=a.map -i=/path/to/lib -l=rts6600_elf.lib --unused_section_elimination=on --retain='*.lib<strcmp.c.obj>(.text)'
    cl6x a.cpp -mv6600 -O3 -z --map_file=a2.map -i=/path/to/lib -l=rts6600_elf.lib --unused_section_elimination=on --retain='rts6600_elf.lib<strcmp.c.obj>(.text)'


    The results are:

     

    As you can see above there is a difference in using *.lib and rts6600_elf.lib directly. I hope this will help you with reproduction. 

  • Thank you for submitting a concise test case.  I can reproduce the same behavior.  I filed EXT_EP-10331 to have this behavior investigated.  You are welcome to follow it with that link.

    Thanks and regards,

    -George