mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-06 23:02:10 +03:00
d16d7b1099
while the error handling function should not be reached in stage 2
(assuming ldso itself was linked correctly), this was not statically
determinate from the compiler's perspective, and in theory a compiler
performing LTO could lift the TLS references (errno and other things)
out of the printf-family functions called in a stage where TLS is not
yet initialized.
instead, perform the call via a static-storage, internal-linkage
function pointer which will be set to a no-op function until the stage
where the real error handling function should be reachable.
inspired by commit
|
||
---|---|---|
.. | ||
dlstart.c | ||
dynlink.c |