]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rtld: ignore load_filtees() calls if we already loading filtees for the obj
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 13 Feb 2024 01:09:03 +0000 (03:09 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 13 Feb 2024 14:24:01 +0000 (16:24 +0200)
commit968a18975adc9c2a619bb52aa2f009de99fc9e24
treebf194353c33db735fcc0e70c70345e144d2af975
parent30b5f6b33b35623e6b6aa1d27a78311e199fa602
rtld: ignore load_filtees() calls if we already loading filtees for the obj

in addition to avoiding it for already loaded filtees. Issue is that
during load, rtld needs to resolve some special ABI symbols, like
executable stack fixer and static TLS initializer, which might trigger
recursion.

Example is libthr which is filter for libsys, and which exports
__pthread_distribute_static_tls.

Tested by: kevans, krion
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43858
libexec/rtld-elf/rtld.c
libexec/rtld-elf/rtld.h