Page MenuHomeFreeBSD

D34716.diff
No OneTemporary

D34716.diff

diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -4920,21 +4920,28 @@
}
static void
-trace_loaded_objects(Obj_Entry *obj)
+trace_calc_fmts(const char **main_local, const char **fmt1, const char **fmt2)
{
- const char *fmt1, *fmt2, *fmt, *main_local, *list_containers;
- int c;
+ *main_local = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_PROGNAME);
+ if (*main_local == NULL)
+ *main_local = "";
- if ((main_local = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_PROGNAME)) ==
- NULL)
- main_local = "";
+ *fmt1 = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_FMT1);
+ if (*fmt1 == NULL)
+ *fmt1 = "\t%o => %p (%x)\n";
- if ((fmt1 = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_FMT1)) == NULL)
- fmt1 = "\t%o => %p (%x)\n";
+ *fmt2 = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_FMT2);
+ if (*fmt2 == NULL)
+ *fmt2 = "\t%o (%x)\n";
+}
- if ((fmt2 = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_FMT2)) == NULL)
- fmt2 = "\t%o (%x)\n";
+static void
+trace_loaded_objects(Obj_Entry *obj)
+{
+ const char *fmt1, *fmt2, *fmt, *main_local, *list_containers;
+ int c;
+ trace_calc_fmts(&main_local, &fmt1, &fmt2);
list_containers = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_ALL);
for (; obj != NULL; obj = TAILQ_NEXT(obj, next)) {

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 2:06 AM (21 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14708525
Default Alt Text
D34716.diff (1 KB)

Event Timeline