SPRUIG8J January 2018 – March 2024
Conditional linking is performed by default. That is, code or data sections are not included in a link unless at least one symbol in that code or data section is referenced.
You can use the RETAIN pragma (Section 5.8.31) to force a section that contains a specific symbol to be included in the link.
You can use the CODE_SECTION (Section 5.8.5) and DATA_SECTION (Section 5.8.8) pragmas to force a symbol to be allocated in a particular section. The symbol must be referenced in a statement other than its declaration to force that section to be included in the link.
The CLINK pragma (Section 5.8.2) indicates that the section that contains the definition of this symbol is eligible for removal during conditional linking. This is the default behavior, so the CLINK pragma usually has no effect.