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.
Hi,
I have buit a CCS project for C64x+ on CCS3.1 and CCS3.3. The project has one assembler source file which included one assembler function, but this function is not invoked by any other API in the whole project. When I link the project, I found the assembler function still allocate to the TEXT segment. I have tried more compiler/linker options, the assembler is still there. My option is "-k -al -o0 -fr"../obj/Debug" -fs"../obj/Debug" -ft"../obj/Debug" -fb"../obj/Debug" -i"../../../../../inc" -d"_DEBUG" -mo -ml3 -mv6400+". I have tried a un-invoked C function, it can be removed when the obj linked.
Do the compiler/linker support to remove un-invoked assembler from the TEXT segment? If that, how to remove it?
Thanks.
Marvin
Marvin,
Try the .clink directive in your assembly file. The directive should appear after the declaration of the .text section. Something like this:
.text
.clink
myfunc:
In the older compilers, the ABI referred to as COFF ABI, conditional linking is not enabled by default. It is enabled using the .clink directive. Starting with the 7.0.0 release, a new abi, EABI, was added which supports conditional linking by default. More information on the .clink directive can be found in the Assembly Language Tools user guide under Assembler Directives.