Files
Frédéric Bérat 97f74c6781 elf: Improve diagnostics for static TLS exhaustion
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>
2026-08-06 12:02:00 +02:00
..
2024-11-28 14:03:25 -03:00