Function called in ISR and Overlay Directive -Keil / 8051 core
Please understand that with Keil on 8051 cores that the subroutine's local variables and any entry arguments beyond what would fit into registers the compiler allocates RAM for the placement of these. The linker then has a complicated job that it does to analyze the full calling tree structure of your program and optimize the pool of memory allocated for these purposes so as to minimize the amount of RAM required. This minimization uses mutual exclusion between code calling sequences to determine what parts of the memory pool can be shared between code paths that do not overlap in the execution flow. 

When you inject an ISR call into the mix of the code calling tree the linker cannot determine from what point the interrupt may come into play. It could come at any time during any one of the mutual exclusion paths that the linker found in the normal mainline code. This means that the linker has to pull the subroutine out of the shared usage pool and allocate data space specifically for the subroutine local variables and maybe even some of its entry arguments. Without this the shared memory pools from other mutually exclusive code execution paths would get polluted and the program would crash in blazing glory. 

The challenge when coding on an 8051 core is try to steer away from designs that use lots of local variables, have lots of entry arguments and have calling contexts that are shared between mainline code and interrupts. You really have to limit the freedoms that you get with other architectures that have a stack that gets used for subroutine argument passing and local variables. Keil chose to not implement everything on the stack and thus produced a tool set that offers performance and optimization that is first class in the industry for 8051 architecture. And for that reason it is important to adapt a coding style that plays into the Keil scheme.

In your case I really recommend that you reconsider your determination that this subroutine has to be called from both the mainline context and the interrupt context. Try to find a design technique that avoids this and your life will be a lot simpler.