The linker removes unused code and data from the output file. This process is called deadstripping. To prevent the linker from deadstripping unreferenced code and data you wish to keep, you must use the -K command line option to force inclusion of symbols.


If you have a C function, contextSwitch that must be kept in the output file (and which the linker will normally remove), you can force its inclusion using: