From nobody Fri Apr 08 01:25:27 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DD21E1A837C2; Fri, 8 Apr 2022 01:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZLCr0Jg0z3FXB; Fri, 8 Apr 2022 01:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649381128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSoL1xR3Ib1NSYs025nlHtPwdqDzARDFF4iwNdRBzg0=; b=ghSUr+rypraerUy67Ij5aN+B0Fefx9dlAsCQrjgbFtz0c9riipqMx0plSVG9PZRuXcGqbB 0hnLVkqE08qkH2SgFC4prwrJFjtUK8/Hq07VNxj2tbWeqftWJzb0Me1KZjpf2Pzq6gFoXR q5CFntVlkpCmRtsY8P2aIBrydhPRXpE/NVVfpZhJf9r4RjA8fa1MO3JAp4szpqAofkyxX5 pPlSZiA78Uzko0eA+1hGS1nKvopPCdaZzd6vBsormbJB9muQIUubWh8c5XujYnyHozOhBt /9NpMiAC0zcueuHTUWa26LWY8/r67oXqmt94ngT2ghpd2BzkUSpbe7OvVjbyvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C348B1B354; Fri, 8 Apr 2022 01:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2381PRH2095167; Fri, 8 Apr 2022 01:25:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2381PRuE095166; Fri, 8 Apr 2022 01:25:27 GMT (envelope-from git) Date: Fri, 8 Apr 2022 01:25:27 GMT Message-Id: <202204080125.2381PRuE095166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6c32463ba5b3 - stable/13 - rtld: use style(9) for trace_loaded_objects() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6c32463ba5b3a429011860d5f312d51f8e66d51b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649381128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pSoL1xR3Ib1NSYs025nlHtPwdqDzARDFF4iwNdRBzg0=; b=VWgvc2rUftIf3gDzkCKafMBvnVYQ73+hym7WrZYKQZL/u0jdSnhjeRFpcGUTXnxZOKq1Pc wRDAwwL25biI/ufSgvspe4JZ61B+rJQ+DMInLkyuG5RIdEnaS/x6FufllcT4hjsNiNe7fp wlnH2i3buXbdhyS79+EBobKZAW3LwKLqRlIY5dK9qjl4hRIZdzxYflWvhA2jgRflE5zjgm pHLZSNkvM6ZLZKHGYcrA94tEU9z4HFXCPyzpfv7WclBNpHR07n2/ed6lgG+QrP+6pqUyPA gKngQ7wBOLhq2k1RCF7INLrhTVNH7m7F1cGY2+y+AgzyelYoSdwOm4IUx2ZKWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649381128; a=rsa-sha256; cv=none; b=lPhDo1Atmq2NTGpBUwdQ/Es2S0PoOBOnwmmuCPArgCyHPPFYFfrVrMT/qUrc/SPhKLMWH5 vC72QUKbszRK76m8r3zDeTdZA1HiMUTp/NOncNJZR0jfB36zBvfOfREnOew3Q2fo6FfdxZ R336QrLHHxGQCwnI4ezpeIhkwt0qQ6BFwO0cueP9WiWvTAlTJ7NScwu+jpozhwty/x0gFz rqna+YaK1981C/qPZNyjSYB3TTfGwtNClJJr8O/VyzY7bGCXuldjJvzJ2pmMaovUJLyCwK SgGfdU+lW9aWljwsGCesV5VmTl8qbMp2/dWzRzS5hBsbrAkmPy7nhient6X+zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6c32463ba5b3a429011860d5f312d51f8e66d51b commit 6c32463ba5b3a429011860d5f312d51f8e66d51b Author: Konstantin Belousov AuthorDate: 2022-03-30 20:48:43 +0000 Commit: Konstantin Belousov 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); + } } - } } /*