freebsd-dev/libexec
Konstantin Belousov 1005d3d053 rtld: fix dlopen() for an object that is already mapped but not yet initialized
For instance, dso might be mapped as needed but not yet initialized from
the other subtree of needed objects, while current object' constructor
does dlopen() for the dso.  Right now rtld does relocations and other
processing based on the arrival of new objects in the global list, which
is not happens there.  Directly check for the initialization state of
the object, for which we would return the handle.

One practical use case of this support is e.g. dlopen("libthr.so",
RTLD_NOLOAD) by libraries that are threading-aware but happy to live
with libc pthread shims if the program is not multithreaded.

Reviewed by:	tijl
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2023-07-16 15:34:34 +03:00
..
atf Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
atrun Mark usage function as __dead2 in programs where it does not return 2023-07-07 10:45:17 -06:00
blacklistd-helper DIRDEPS_BUILD: Connect new directories and update dependencies. 2016-06-03 19:25:30 +00:00
bootpd Mark usage function as __dead2 in programs where it does not return 2023-07-07 10:45:17 -06:00
comsat Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
dma dma: install a simple example for the auth.conf file 2023-05-15 09:20:14 +02:00
fingerd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
flua flua: chown(2) binding, fix bad copy/paste 2022-11-25 09:05:40 +01:00
ftpd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
getty Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
hyperv pkgbase: Create a FreeBSD-hyperv package 2021-09-07 10:24:54 +02:00
mail.local Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
makewhatis.local makewhatis: do not try to operate on read-only mounted directories 2018-10-27 17:15:58 +00:00
mknetid Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
phttpget spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pppoed spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
rbootd Mark usage function as __dead2 in programs where it does not return 2023-07-07 10:45:17 -06:00
rc /etc/rc.subr: rename sysctl.conf.d to sysctl.kld.d 2023-07-15 14:16:08 +01:00
revnetgroup Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.rquotad Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.rstatd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.rusersd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
rpc.rwalld Mark usage function as __dead2 in programs where it does not return 2023-07-07 10:45:17 -06:00
rpc.sprayd spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD 2023-05-12 10:44:04 -06:00
rtld-elf rtld: fix dlopen() for an object that is already mapped but not yet initialized 2023-07-16 15:34:34 +03:00
rtld-elf32 libcompat: Correct rtld MLINKS 2019-11-12 22:31:59 +00:00
save-entropy spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
smrsh Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
talkd spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
tcpd Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
tests
tftp-proxy Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
tftpd spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
ulog-helper spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
ypxfr Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Makefile Remove portsnap(8) 2023-04-22 18:12:37 -07:00
Makefile.inc Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00