svn commit: r362249 - head/libexec/rtld-elf
Konstantin Belousov
kib at FreeBSD.org
Tue Jun 16 21:23:39 UTC 2020
Author: kib
Date: Tue Jun 16 21:23:39 2020
New Revision: 362249
URL: https://svnweb.freebsd.org/changeset/base/362249
Log:
Systematically pass RTLD_LO_TRACE to load_needed_objects().
Which makes all calls to load_object() to observe the flag, except the
calls for preloaded DSOs.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/libexec/rtld-elf/rtld.c
Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c Tue Jun 16 21:07:51 2020 (r362248)
+++ head/libexec/rtld-elf/rtld.c Tue Jun 16 21:23:39 2020 (r362249)
@@ -721,7 +721,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr
preload_tail = globallist_curr(TAILQ_LAST(&obj_list, obj_entry_q));
dbg("loading needed objects");
- if (load_needed_objects(obj_main, 0) == -1)
+ if (load_needed_objects(obj_main, ld_tracing != NULL ? RTLD_LO_TRACE :
+ 0) == -1)
rtld_die();
/* Make a list of all objects loaded at startup. */
@@ -3472,7 +3473,7 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref
}
if (result != -1)
result = load_needed_objects(obj, lo_flags & (RTLD_LO_DLOPEN |
- RTLD_LO_EARLY | RTLD_LO_IGNSTLS));
+ RTLD_LO_EARLY | RTLD_LO_IGNSTLS | RTLD_LO_TRACE));
init_dag(obj);
ref_dag(obj);
if (result != -1)
More information about the svn-src-all
mailing list