Re: [PATCH v2] elf: Remove dead l_need_tls_init static-TLS init path
Florian Weimer <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <[email protected]> |
* Adhemerval Zanella:
> Since af34b1376a3 ("elf: Initialize static TLS before relocation
> processing", BZ 34164) dropped the 'defer-if-not-relocated' branch in
> _dl_try_allocate_static_tls, nothing sets l_need_tls_init any more. The
> second pass in update_tls_slotinfo, guarded by l_need_tls_init, is
> therefore dead: its _dl_update_slotinfo / _dl_init_static_tls calls never
> run, and the static TLS image is initialised inline during relocation (IE
> model) or lazily on first dynamic-TLS access instead.
>
> Remove the dead loop, the now write-only l_need_tls_init field and its
> clear in _dl_allocate_tls_init. No functional change.
>
> Checked on aarch64-linux-gnu, x86_64-linux-gnu, and i686-linux-gnu.
> I also run the elf tests on armv7-a, alpha, loongarch64, mips64le,
> powerpc, riscv, and s390x using qemu system.
> ---
> elf/dl-open.c | 76 +++++++++++++-------------------------------------
> elf/dl-tls.c | 9 ++----
> include/link.h | 3 --
> 3 files changed, 22 insertions(+), 66 deletions(-)
This version looks good to me.
Reviewed-by: Florian Weimer <[email protected]>
Thanks,
Florian