On Fri, 31 Jan 2025 at 09:09, Jason King <jason.brian.k...@gmail.com> wrote: > 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).
I think it also depends on how much of the program text ends up having to change. In the libc case, though I have not looked at this moment, it's conceivable that there are a lot of syscall stubs laced throughout the program text. A whole-library switch may facilitate better sharing of pages, or might just be faster to link, etc. It would require some investigation and measurement to know one way or another. Cheers. -- Joshua M. Clulow http://blog.sysmgr.org ------------------------------------------ illumos: illumos-discuss Permalink: https://illumos.topicbox.com/groups/discuss/T9811b44617503fdd-M55052f5a732b87ae7a528ffd Delivery options: https://illumos.topicbox.com/groups/discuss/subscription