Re: [PATCH v2] ld.so.8: Document effect of hwcaps on search path

Michael Kerrisk (man-pages)
2012-04-16T19:19:02Z

Jonathan,

On Tue, Apr 17, 2012 at 7:03 AM, Jonathan Nieder <jrnieder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Wording by Aurelien Jarno from Debian glibc's r4701 (2011-06-04).
>
> Addresses http://bugs.debian.org/622385
>
> Requested-by: Reuben Thomas <rrt-0NV8xZLkR+A@public.gmane.org>
> Signed-off-by: Jonathan Nieder <jrnieder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> Michael Kerrisk (man-pages) wrote:
>
>> IIUC, your purpose is to allow Debian to drop downstream ld.so.8, by
>> ensuring that upstream ld.so.8 has everything that useful from the
>> downstream (purpose 1).
>
> Let's just handle them as isolated patches.  This one comes from
> Debian and the text matches what I get with "man ld.so" on a Debian
> system.  Since v1, I have rebased it against "master" and rewrapped to
> use 76-character instead of 80-character lines.

Some minor formatting points:
* Please start new sentences on new lines.
* I strongly prefer the forms .B, .I, etc. over \fB...\fP, etc. Also,
the particular case here if a pathname should be formatted italic.

Could you please tweak as above and resend.

See also comments below.

>
>  man8/ld.so.8 |   33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> diff --git a/man8/ld.so.8 b/man8/ld.so.8
> index 2fbacae0..c0084376 100644
> --- a/man8/ld.so.8
> +++ b/man8/ld.so.8
> @@ -64,6 +64,8 @@ in the augmented library path.
>  If, however, the binary was linked with the
>  .B \-z nodeflib
>  linker option, libraries in the default library paths are skipped.
> +Libraries installed in hardware capabilities directories (see below)
> +are preferred to other libraries.
>  .IP o
>  In the default path
>  .IR /lib ,
> @@ -129,6 +131,37 @@ is set-user-ID or set-group-ID.
>  .TP
>  .B \-\-audit LIST
>  Use objects named in LIST as auditors.
> +.SH HARDWARE CAPABILITIES
> +Libraries might be compiled using hardware-specific instructions which do
> +not exist on every CPU. Such libraries should be installed in directories
> +whose name defines the hardware capabilities such as \fB/usr/lib/sse2/\fR.

name defines ==> names define

> +The dynamic linker checks these directories against the hardware of the
> +machine and selects the best suitable version of a given library. Hardware

best suitable ==> most suitable

> +capabilities directories could be cascaded to combine CPU features. Hardware

"could be"? Should this be "can be"?

> +capabilities depends on the CPU. The following names are currently

depends ==> depend

> +recognized:
> +.B Alpha
> +ev4, ev5, ev56, ev6, ev67
> +.TP
> +.B MIPS
> +loongson2e, loongson2f, octeon, octeon2
> +.TP
> +.B PowerPC
> +4xxmac, altivec, arch_2_05, arch_2_06, booke, cellbe, dfp, efpdouble, efpsingle,
> +fpu, ic_snoop, mmu, notb, pa6t, power4, power5, power5+, power6x, ppc32, ppc601,
> +ppc64, smt, spe, ucache, vsx
> +.TP
> +.B SPARC
> +flush, muldiv, stbar, swap, ultra3, v9, v9v, v9v2
> +.TP
> +.B s390
> +dfp, eimm, esan3, etf3enh, g5, highgprs, hpage, ldisp, msa, stfle,
> +z900, z990, z9-109, z10, zarch
> +.TP
> +.TP
> +.B x86 (32-bit only)
> +acpi, apic, clflush, cmov, cx8, dts, fxsr, ht, i386, i486, i586, i686, mca, mmx,
> +mtrr, pat, pbe, pge, pn, pse36, sep, ss, sse, sse2, tm
>  .SH ENVIRONMENT
>  There are four important environment variables.
>  .TP
> --
> 1.7.10
>

Thanks,

Michael

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/