Re: [PATCH 1/5] ld.so.8: Update environment variables from recent glibc versions

Alejandro Colomar
2023-10-18T19:06:29Z

[-- Attachment #1: Type: text/plain, Size: 4586 bytes --]

Hi Adhemerval!

On Wed, Oct 18, 2023 at 02:21:00PM -0300, Adhemerval Zanella wrote:
> Recent glibc version removed support for LD_TRACE_PRELINKING,
> LD_ASSUME_KERNEL, and LD_USE_LOAD_BIAS.
>
> Also adds a note for LD_HWCAP_MASk that since 2.26 the environment
> variable might be ignored if glibc does not support tunables.
>
> Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---

Patch applied. Thanks!

I've also applied some small fixes for consistency, and to use "semantic
newlines". See below.

Cheers,
Alex

P.S.:
I'm deprecating <alx.manpages@gmail.com>; please use <alx@kernel.org>.

---

diff --git a/man8/ld.so.8 b/man8/ld.so.8
index 5b5c22825..1999c24d6 100644
--- a/man8/ld.so.8
+++ b/man8/ld.so.8
@@ -310,7 +310,7 @@ .SS Secure-execution mode
.SS Environment variables
Among the more important environment variables are the following:
.TP
-.BR LD_ASSUME_KERNEL " (from glibc 2.2.3 to 2.36)"
+.BR LD_ASSUME_KERNEL " (from glibc 2.2.3 to glibc 2.36)"
Each shared object can inform the dynamic linker of the minimum kernel ABI
version that it requires.
(This requirement is encoded in an ELF note section that is viewable via
@@ -628,7 +628,9 @@ .SS Environment variables
is ignored in secure-execution mode.
.TP
.BR LD_HWCAP_MASK " (from glibc 2.1 to glibc 2.38)"
-Mask for hardware capabilities. Since glibc 2.26 the option might be ignored
+Mask for hardware capabilities.
+Since glibc 2.26,
+the option might be ignored
if glibc does not support tunables.
.TP
.BR LD_ORIGIN_PATH " (since glibc 2.1)"
@@ -703,7 +705,7 @@ .SS Environment variables
.\" (This is what seems to happen, from experimenting)
then all prelinking activity is traced.
.TP
-.BR LD_USE_LOAD_BIAS " (from glibc 2.3.3 to 2.35)"
+.BR LD_USE_LOAD_BIAS " (from glibc 2.3.3 to glibc 2.35)"
.\" http://sources.redhat.com/ml/libc-hacker/2003-11/msg00127.html
.\" Subject: [PATCH] Support LD_USE_LOAD_BIAS
.\" Jakub Jelinek

$ MANWIDTH=72 man man-pages | sed -n '/Use semantic newlines/,/^$/p'
Use semantic newlines
In the source of a manual page, new sentences should be started
on new lines, long sentences should be split into lines at
clause breaks (commas, semicolons, colons, and so on), and long
clauses should be split at phrase boundaries. This convention,
sometimes known as "semantic newlines", makes it easier to see
the effect of patches, which often operate at the level of in‐
dividual sentences, clauses, or phrases.

> man8/ld.so.8 | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/man8/ld.so.8 b/man8/ld.so.8
> index 900f3a9b9..5b5c22825 100644
> --- a/man8/ld.so.8
> +++ b/man8/ld.so.8
> @@ -310,7 +310,7 @@ A nonzero value may have been set by a Linux Security Module.
> .SS Environment variables
> Among the more important environment variables are the following:
> .TP
> -.BR LD_ASSUME_KERNEL " (since glibc 2.2.3)"
> +.BR LD_ASSUME_KERNEL " (from glibc 2.2.3 to 2.36)"
> Each shared object can inform the dynamic linker of the minimum kernel ABI
> version that it requires.
> (This requirement is encoded in an ELF note section that is viewable via
> @@ -627,8 +627,9 @@ Since glibc 2.3.4,
> .B LD_DYNAMIC_WEAK
> is ignored in secure-execution mode.
> .TP
> -.BR LD_HWCAP_MASK " (since glibc 2.1)"
> -Mask for hardware capabilities.
> +.BR LD_HWCAP_MASK " (from glibc 2.1 to glibc 2.38)"
> +Mask for hardware capabilities. Since glibc 2.26 the option might be ignored
> +if glibc does not support tunables.
> .TP
> .BR LD_ORIGIN_PATH " (since glibc 2.1)"
> Path where the binary is found.
> @@ -691,7 +692,7 @@ Since glibc 2.3.4,
> .B LD_SHOW_AUXV
> is ignored in secure-execution mode.
> .TP
> -.BR LD_TRACE_PRELINKING " (since glibc 2.4)"
> +.BR LD_TRACE_PRELINKING " (from glibc 2.4 to glibc 2.35)"
> If this environment variable is defined,
> trace prelinking of the object whose name is assigned to
> this environment variable.
> @@ -702,7 +703,7 @@ If the object name is not recognized,
> .\" (This is what seems to happen, from experimenting)
> then all prelinking activity is traced.
> .TP
> -.BR LD_USE_LOAD_BIAS " (since glibc 2.3.3)"
> +.BR LD_USE_LOAD_BIAS " (from glibc 2.3.3 to 2.35)"
> .\" http://sources.redhat.com/ml/libc-hacker/2003-11/msg00127.html
> .\" Subject: [PATCH] Support LD_USE_LOAD_BIAS
> .\" Jakub Jelinek
> --
> 2.34.1
>

--
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]