On Wed, Dec 19, 2018 at 07:53:48PM +0000, Uecker, Martin wrote:
> What do you think about making the trampoline a single call
> instruction and have a large memory region which is the same
> page mapped many times?
> 
> 
> call trampoline_handler
> call trampoline_handler
> call trampoline_handler
> ...
> ...
> many identical read-only pages
> ...
> ...
> 
> 
> The trampoline handler would pop the instruction pointer and use
> this as an index into the real stack to read the static chain and
> function pointer.

While you save a few bytes per trampoline that way, it is heavily call-ret
stack unfriendly, so it will not be very fast.

        Jakub

Reply via email to