| ▲ | mananaysiempre 5 hours ago | |
Could be a number of things depending on context. In this case it’s a short function that adjusts some things and jumps to the actual functions (a “thunk” is another term for this). Specifically, if in GCC you write
then what the compiled code for f does is construct on the stack a short piece of machine code:
and &g points to the start not of g’s code but of this snippet on the stack, which has the parent function’s frame pointer compiled into it as a literal constant. The snippet is called a trampoline. | ||