You are correct that jumping is often a way to effectively control shell functions that are not built-in.
Usually you will need to read all the parameters of the function and put them back on the stack before you can call the subfunction.
But when the wrapper function has the same prototype:
- Same calling convention
- The same parameters (and in the same order)
- Same return type
There is no need for all normal function overhead calls. You can simply go straight to the goal. (These categories may not be entirely necessary, as this may be possible in some other cases.)
All parameters (either in the stack or in the register) that were configured when the wrapper function was called will already be in place (and compatible) for the sub-function.
Mysticial
source share