The nested function's name is visible only to its lexical parents.
However, the parent function is allowed to pass the address of the
nested function to another function called by the parent.
The called function can be lexically unrelated. E.g. qsort in libc. So
the passed address must behave as a standard C function address.
qsort uses an unknown and possibly variable amount of stack, so the
"locations higher up in the stack" cannot be determined at compile time.
The only information passed around within qsort is the nested function
address, which must somehow encode the parent function's stack frame as
well as being a callable function address. GCC implements this with
trampolines.
have a nice day,
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/