HomeFreeBSD

rtld: workaround for broken ABI

Description

rtld: workaround for broken ABI

Right now, libthr does not initialize RtldLockInfo.rtli_version when calling
_rtld_thread_init(), which makes versioning the interface troublesome.

Add a workaround: if the calling object of _rtld_thread_init() exports
the "_pli_rtli_version" symbol, then consider rtli_version initialized.
Otherwise, forcibly set it to RTLI_VERSION_ONE, currently defined as
RTLI_VERSION.

Export "_pli_rtli_version" from libthr and properly initialize rtli_version.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D29633

Details

Provenance
kibAuthored on Apr 10 2021, 12:32 PM
Differential Revision
D29633: rtld: make dlerror() thread-local
Parents
rG4d7f08c84bcf: rtld: unstaticise lockinfo and obj_from_addr()
Branches
Unknown
Tags
Unknown