9.6.3 Function Pointers

The MPLAB XC-DSC C Compiler fully supports pointers to functions, which allows functions to be called indirectly. Function pointers are always 16 bits wide.

Because function pointers are only 16 bits wide, these pointers cannot point beyond the first 64K of Flash. If the address of a function that is allocated beyond the first 64K of Flash is taken, the linker will arrange for a handle section to be generated. The handle section will always be allocated within the first 64K. Each handle provides a level of indirection which allows 16-bit pointers to access the full range of Flash. This operation may be disabled with the --no-handles linker option.