From nobody Thu Sep 29 00:29:44 2022 X-Original-To: dev-commits-src-branches@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 4MdDlD3kHMz4YPWG; Thu, 29 Sep 2022 00:29:44 +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 4MdDlD370dz3WY0; Thu, 29 Sep 2022 00:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664411384; 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=Gtitis+hePYH/pB2S1YtgITzoujp+5jgfMYmL5iJ8YY=; b=euXVu+qgJQ1Vg2gS7kOJsTHaylRdjA8o5c913qG7qM9dIC+2qX0zlikWukb5CHQeqyrwXd /kQLdxUnOf9Q6yxP3bQTX9uOngI0fIz24PdiXbzvLESZcyaL4WS9T5VpZe7kCjzN2+nznn p92oogo8r7IJ/ZR+qjO9rppNnjfUNbgTWGam8tC2CBcHNX2IshKJbtxIO6fLgTEyDadr7J um1c8p2IZ1hXJGAx0OyeexUQQ/JmyW9/EVo70KkbkwTL1ica452NiGuY8fzhQN26GQZI44 qDUPBIclxFUeSiLiCeWH9+Yzl3oro8nL0Ifi3TWCb03PVBMnPH9DHMLQ/Fe1Xg== 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 4MdDlD27YyzdsF; Thu, 29 Sep 2022 00:29:44 +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 28T0Ticf084630; Thu, 29 Sep 2022 00:29:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28T0TiFU084629; Thu, 29 Sep 2022 00:29:44 GMT (envelope-from git) Date: Thu, 29 Sep 2022 00:29:44 GMT Message-Id: <202209290029.28T0TiFU084629@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: 6958ee33b742 - stable/13 - ldd: remove '[preloaded]' marker for the preloaded objects List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 6958ee33b7426976bcafa3e743ae6f18e87cc3e4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664411384; 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=Gtitis+hePYH/pB2S1YtgITzoujp+5jgfMYmL5iJ8YY=; b=OD70cSpMTo1JnGQQouXY2k2sLPZ8vL7BLTJU3Ur8oRkOgp6tHF+1dzY84Y+pcOqK52jBg7 Vz1c5vhsMziVkUyZ2Wzrd7WppT0zwMVPtyJjoANp0aKofGDPXXwgKz535B9eZrKj8OnbV8 36oPh9nRr5Q3pgKF0K3s7bfF0GWmUuAsE1xEm9TvtRGNfmbNTkcyePC7I7BmlZl/lWaIA/ RFPuVkhSbcY/sMkb2lW/r9TAUv/a1tRXa/UQMFWDxCPcpnRLWLj26Cl3+jekicnMnSif8z txtqsfJc1IpIBudNG2a46ugcTvD5wRSW2/YrYs+VQ9Ou68vkSspwxpH+d0A2Mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664411384; a=rsa-sha256; cv=none; b=HNa2OllsqR81xIgCjIo/gM9QnPlOz5G4BsBfFDdegADOHMi6kXDZc9e6tKRp43x7dgoHPI Dg4bLRCJwEQdm4R2Ht1Ccuh4C7VVkTaBw2KbrLyjxuqR5NuesnfZWyOWnBKFu4a7TtiUd+ onMzoHxxhSJOAMdlUrLu6/HC+MDytAAAf9iY2L98CiGjZByAwit55kZIg6Nm3sb7e7Dh4v jyc1CQVRxjGXheBJaG89vPq3r8gWp7KHz+PKvOAnkEiZ+BUu3XF9dQqXQZSl4E6835jx2t FPDbAfSEW736UmK7GD08uhJu/tGxPOTmrAc/1Cidm1F5mk2duGCCF4kDk2O5/A== 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=6958ee33b7426976bcafa3e743ae6f18e87cc3e4 commit 6958ee33b7426976bcafa3e743ae6f18e87cc3e4 Author: Konstantin Belousov AuthorDate: 2022-09-18 00:49:30 +0000 Commit: Konstantin Belousov CommitDate: 2022-09-29 00:29:09 +0000 ldd: remove '[preloaded]' marker for the preloaded objects PR: 265750 (cherry picked from commit 2f72ee987d492b3dc9116c5cf49777edd2474b11) --- libexec/rtld-elf/rtld.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 0cfd97d96389..99a79682971f 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5002,7 +5002,12 @@ trace_print_obj(Obj_Entry *obj, const char *name, const char *path, const char *fmt; int c; - fmt = strncmp(name, "lib", 3) == 0 ? fmt1 : fmt2; /* XXX bogus */ + if (fmt1 == NULL) + fmt = fmt2; + else + /* XXX bogus */ + fmt = strncmp(name, "lib", 3) == 0 ? fmt1 : fmt2; + while ((c = *fmt++) != '\0') { switch (c) { default: @@ -5084,19 +5089,23 @@ trace_loaded_objects(Obj_Entry *obj, bool show_preload) } if (show_preload) { + if (ld_get_env_var(LD_TRACE_LOADED_OBJECTS_FMT2) == NULL) + fmt2 = "\t%p (%x)\n"; first_spurious = true; + TAILQ_FOREACH(obj, &obj_list, next) { if (obj->marker || obj == obj_main || obj->traced) continue; - if (first_spurious) { + if (list_containers && first_spurious) { rtld_printf("[preloaded]\n"); first_spurious = false; } + Name_Entry *fname = STAILQ_FIRST(&obj->names); name = fname == NULL ? "" : fname->name; trace_print_obj(obj, name, obj->path, main_local, - fmt1, fmt2); + NULL, fmt2); } } }