主权项 |
1. A computer implemented method for generating stubs, the method comprising:
receiving, by a processing circuit, a call to a called function; retrieving, by the processing circuit, a called function property of the called function; generating, by the processing circuit, a stub for the called function based on the called function property; optimizing instructions in the stub based on a near call distance responsive to determining that the called function is reachable with a memory address offset from a branch in the stub, wherein the near call distance does not require full address bits; and optimizing the stub based on a far call distance responsive to determining that the called function requires more address bits than provided in the near call distance, wherein the far call distance requires the full address bits. |