mirror of
git://sourceware.org/git/glibc.git
synced 2026-09-08 23:58:31 +08:00
Improve the error diagnostics printed when static TLS allocation fails during dlopen. The CHECK_STATIC_TLS macro is updated to pass the fully resolved sym and the referencing map over to _dl_allocate_static_tls, modifying its signature. When _dl_allocate_static_tls is called, it now attempts to reconstruct what failed using _dl_exception_create_format. It displays: * The name of the symbol that triggers this. * Whether this is due to static TLS space being exhausted, or if the symbol has previously been used as global-dynamic and is now being tried to use as initial-exec. * If the symbol-defining map is different from the referencing map, it includes its name as well. * If static TLS is exhausted, includes requested size and available size. The change cascades through all architecture variants modifying their dl-machine calls to CHECK_STATIC_TLS to conform to the new prototype. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>