The biggest differences I’m aware of between them is how syscalls are performed. Newer (relatively speaking) CPUs have nicer instructions for syscalls as well as things like optimized implementations of some of the libc string functions. During boot, the system will try to pick the ‘best’ one to use and loopback mount it over the more generic libc.
Newer libraries would likely use linker capabilities to do this in a single library (if the author is aware of them – it’s actually a neat feature that isn’t as well known as it should be IMO). I don’t have access to the relevant history (this all predates illumos), but my best guess is that the linker functionality to allow selection of an optimized implementation of a function based on CPU capabilities probably came later (and no one’s been interested in doing the work to consolidate them – I suspect it’d get rather tedious). From: Udo Grabowski (IMKASF) <udo.grabow...@kit.edu> Date: Friday, January 31, 2025 at 10:56 AM To: discuss@lists.illumos.org <discuss@lists.illumos.org> Subject: Re: [discuss] whats the /lib/libc.so.1 mount for ? On 31-01-2025 17:45, Udo Grabowski (IMKASF) wrote: > > > On 31-01-2025 17:43, Enrico Weigelt, metux IT consult wrote: >> Hi folks, >> >> I'm wondering what the /lib/libc.so.1 mount is actually for. >> >> Are there different libc versions that might be mounted ? >> Where and how exactly is the decision made ? Who mounts it ? >> > It depends on the hardware capabilities of the processor, for > Intel it's usually libc_hwcap1.so.1, for AMD I have > libc_hwcap2.so.1, and there's a libc_hwcap3.so.1 (ARM?) too. > > /lib/libc.so.1 on /usr/lib/libc/libc_hwcap2.so.1 read/write/setuid/ > devices/dev=4c50002 on Mon Dec 16 12:29:34 2024 Here are the specific capabilities used in the different versions (3 is not ARM), see them with 'file': /usr/lib/libc/libc_hwcap3.so.1: [SSE MMX CMOV FPU] /usr/lib/libc/libc_hwcap2.so.1: [SSE2 SSE MMX CMOV AMD_SYSC FPU] /usr/lib/libc/libc_hwcap1.so.1: [SSE MMX CMOV SEP FPU] -- Dr.Udo Grabowski Inst.of Meteorology & Climate Research IMKASF-SAT https://www.imk-asf.kit.edu/english/sat.php KIT - Karlsruhe Institute of Technology https://www.kit.edu Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026 ------------------------------------------ illumos: illumos-discuss Permalink: https://illumos.topicbox.com/groups/discuss/T9811b44617503fdd-M1bf20a2e57ee79e8c4bdc6b9 Delivery options: https://illumos.topicbox.com/groups/discuss/subscription