]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rtld: trace preloaded objects
authorKonstantin Belousov <kib@FreeBSD.org>
Wed, 30 Mar 2022 21:01:54 +0000 (00:01 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Fri, 1 Apr 2022 00:51:22 +0000 (03:51 +0300)
commit0913953c9ed0f6ac3dd57aa06e1d7c8a1a6c5530
treeb9d098921a4a927fcbb34e91630b97d68e611653
parentdb0372808ad7575bd467049daa25a4415c6b2bab
rtld: trace preloaded objects

Before, preloaded objects, if not listed as needed for any normally
linked objects, were silently ignored.

Preloaded objects are printed with the `[preloaded]` herald. The list
includes the objects not listed explicitly as recursive dependencies of
the main object, effectively dsos loaded by LD_PRELOAD mechanism.
vdso is listed as well, since it is not needed by anything.

Since there is no DT_NEEDED entry for LD_PRELOADed objects, they are
usually printed using LD_TRACE_LOADED_OBJECTS_FTM2 format due to the
failure of the heuristic based on the presence of the 'lib' prefix.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D34716
libexec/rtld-elf/rtld.c