I have four functions that the linker gives me the warning:
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?UART_RX_ISR_STUB?ISR *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?TIMER0_ISR_STUB?ISR *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?TIMER2_ISR_STUB?ISR *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?ASDC0_ISR_STUB?ISR
The way C51 does its work, it has to know about all possible execution paths. This means that calls into the compiled code from out of the blue, which the compiler knows nothing about, are essentially forbidden. You have to tell the compiler about those functions being called from elsewhere. That's where the OVERLAY linker control enters the game. Use it.