From nobody Thu Nov 07 05:20:38 2024 X-Original-To: dev-commits-src-main@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 4XkVlX1w1gz5cNHr; Thu, 07 Nov 2024 05:20:40 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XkVlV4NMcz55H8; Thu, 7 Nov 2024 05:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730956838; 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=VqyRKdAkHosStlwj3hJKbM8NAx5OOY+ye77oCytZEK4=; b=wWXlnkuynhI0oqzbp15of0BSWWS6njh/HlYH3bFkOcaKbLIm9wuCaYLI6E1nxyXGbeepBc v/eMBN3YPEF5/MsH7SOOvtMIP2K7bA0GAPsa3rIB7LTvMMTkCLKT68GSUt7iAdInDexPIf NSwNz2mSvIKqtnwrtQiXQVPyOSGteTnCL4JW7LZnJ+0U47YdwxbSJ1rVTzACz4hVlmoZLL 8q515lF06Eo7yW0vzhU3JGrLKVy65BAsFVOHi0nD0t6rwMedCuKSOrZsRIgpl0hjb2kXrz 5loutzz9GprV8ENVquHwFN0mV59XiELqecsC7K5Xnz9/BJ7tn4kuvHYdbln/iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730956838; 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=VqyRKdAkHosStlwj3hJKbM8NAx5OOY+ye77oCytZEK4=; b=Bjl622KtPuCB0WUrAQrntY7TbGNc0Nz9fv6/IvYdDFwM6feGOz/1e0FJqmX/Fon77PFznw /JtN25PjKjal/6XtcJoMaT7x4BVHpI9CHcrh2Bd+G9ZAtksYgDEZ15mAi8/cdAZFuJem+6 MAJtHByvthBVaHIG+OeRdtFdy4ER5oIicNE/MzGha3NU7Hev0e8lueubCyvAoFe3ppeFVO CT1QzdICWdQmS5lNeeiXmGp4/NVoRatmMBvEHM1belxEHlYguDjc7RBNpeXMGIF5iePsVs 6O66NAP4oU2BDW5X7K2xE7POV+Q+0kxSTNmYDpFhOlGrAWi9S/lJBsoJRum5Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730956838; a=rsa-sha256; cv=none; b=KGB/rImU0WW4prJIXvGRJmVRmWKTFKPO5yxiM6MK8Uvt3lWhfaLShWYRyGKLqaHbSVX7mw j20exGX+iydJXvuNQnuQG/z+vF7qCze8qtyniVJXpmAn+GU6MBBgItL/TjSBU8s3W7h7oB +bTxpuD8039rpp5wyMda00TYAkQ2zA5fuWMnEkHgpOGUIbS6LgS0Iy1aBcJMC9uEeMtCgA 6stobBqw2nBnu9vO6JkFcG6F0gejjow3QoLoBACsI5Y6gDMhEE9SRI8IL7/PKhYABVAv04 +2yBvhsQbcA2uRYgT3mbELjPDo+CnrvM09vaFUParP5voF/vuqNFtoIHBqRmFQ== 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 4XkVlV2z8KzXtf; Thu, 7 Nov 2024 05:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A75KcSU014694; Thu, 7 Nov 2024 05:20:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A75KcVr014691; Thu, 7 Nov 2024 05:20:38 GMT (envelope-from git) Date: Thu, 7 Nov 2024 05:20:38 GMT Message-Id: <202411070520.4A75KcVr014691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 16d000bdac54 - main - rtld.1: cross-reference rtld_get_var.3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 16d000bdac54d7153f33a0d050bcc4307b702751 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=16d000bdac54d7153f33a0d050bcc4307b702751 commit 16d000bdac54d7153f33a0d050bcc4307b702751 Author: Konstantin Belousov AuthorDate: 2024-10-31 20:20:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-07 05:15:30 +0000 rtld.1: cross-reference rtld_get_var.3 Reviewed by: Alexander Ziaee Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47351 --- libexec/rtld-elf/rtld.1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 5631c28e1f84..62e4fc5676c2 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -138,6 +138,15 @@ all the environment variables listed below, but is being prefixed with for example: .Ev LD_32_TRACE_LOADED_OBJECTS . If the activated image is setuid or setgid, the variables are ignored. +.Pp +The run-time linker is able to access the environment provided +at process startup. +After startup, environment variables are maintained by higher-level +libraries and are not accessible by the run-time linker. +At run-time, effective settings can be queried using +.Xr rtld_get_var 3 , +and some of them can be changed with +.Xr rtld_set_var 3 . .Bl -tag -width ".Ev LD_LIBMAP_DISABLE" .It Ev LD_DUMP_REL_POST If set, @@ -527,6 +536,7 @@ The libmap configuration file for 32-bit binaries on 64-bit system. .Xr ld 1 , .Xr ldd 1 , .Xr dlinfo 3 , +.Xr rtld_get_var 3 , .Xr capsicum 4 , .Xr elf 5 , .Xr libmap.conf 5 ,