Shared libraries
Shared libraries
Posted Nov 28, 2025 10:43 UTC (Fri) by farnz (subscriber, #17727)In reply to: Shared libraries by bluca
Parent article: APT Rust requirement raises questions
You really, really don't if you're RAM constrained (welcome to embedded!).
The kernel is not operating at the level of entire files; it's operating at the page level. Pages that contain relocations are only shared up until the relocation is overwritten by the dynamic linker; pages where the only data used at runtime is relocation metadata are only used up until all the relocations have been handled, at which point they become unused pages.
You can thus have 90% of glibc in RAM, but the critical parts for process startup are not, and you have to do small I/Os to get the missing pages.
