* Marcel Plch:
I don't see any problem in this.
Even if an extension function receives a pointer to a local variable,
it should be fine as long as the variable is up the stack. Should it be
downwards, it is undefined behavior anyways, linked or not.
Maybe I have just misunderstood, can you please come up with a specific
scenario, even better an example, where the problem occurs?
If you take the address of a local variable and pass the resulting
pointer to another function, the compiler will generate a call to
__stack_chk_fail, which lives in glibc. At build time, linking against
glibc is required so that this symbol receives its proper version,
otherwise the resulting binary is invalid and may not be compatible with
future glibc versions.