Crossware

Table of Contents        Previous topic       Next topic       

C COMPILER->Code Bank Switching->Linker Optimisations

If you examine the code generated by the compiler you will notice that all calls to a function in a switchable bank go through the bank switching stub code even if the calling function and called function are in the same bank.  You will also notice that stubs are generated for every banked function even for functions that are never called from outside their own bank.

Since a bank can be spread across multiple modules, these two potential inefficienies are best removed by the linker.  To do this the linker carries out the following operations: