Date: Fri, 8 Apr 2022 01:25:27 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6c32463ba5b3 - stable/13 - rtld: use style(9) for trace_loaded_objects() Message-ID: <202204080125.2381PRuE095166@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6c32463ba5b3a429011860d5f312d51f8e66d51b commit 6c32463ba5b3a429011860d5f312d51f8e66d51b Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-03-30 20:48:43 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-04-08 01:25:17 +0000 rtld: use style(9) for trace_loaded_objects() (cherry picked from commit b0bc8cc70518e1c02c5f68ccf7ab1760fd442310) --- libexec/rtld-elf/rtld.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index a73dc5e5d350..b7461faeb878 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5040,32 +5040,33 @@ trace_print_obj(Obj_Entry *obj, const char *name, const char *path, static void trace_loaded_objects(Obj_Entry *obj) { - const char *fmt1, *fmt2, *main_local, *list_containers; + const char *fmt1, *fmt2, *main_local, *list_containers; - trace_calc_fmts(&main_local, &fmt1, &fmt2); - list_containers = ld_get_env_var(LD_TRACE_LOADED_OBJECTS_ALL); + 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)) { - Needed_Entry *needed; - const char *name, *path; + for (; obj != NULL; obj = TAILQ_NEXT(obj, next)) { + Needed_Entry *needed; + const char *name, *path; - if (obj->marker) - continue; - if (list_containers && obj->needed != NULL) - rtld_printf("%s:\n", obj->path); - for (needed = obj->needed; needed; needed = needed->next) { - if (needed->obj != NULL) { - if (needed->obj->traced && !list_containers) - continue; - needed->obj->traced = true; - path = needed->obj->path; - } else - path = "not found"; + if (obj->marker) + continue; + if (list_containers && obj->needed != NULL) + rtld_printf("%s:\n", obj->path); + for (needed = obj->needed; needed; needed = needed->next) { + if (needed->obj != NULL) { + if (needed->obj->traced && !list_containers) + continue; + needed->obj->traced = true; + path = needed->obj->path; + } else + path = "not found"; - name = obj->strtab + needed->name; - trace_print_obj(obj, name, path, main_local, fmt1, fmt2); + name = obj->strtab + needed->name; + trace_print_obj(obj, name, path, main_local, + fmt1, fmt2); + } } - } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204080125.2381PRuE095166>