Shared libraries
Shared libraries
Posted Nov 25, 2025 11:11 UTC (Tue) by euclidian (subscriber, #145308)In reply to: Shared libraries by mb
Parent article: APT Rust requirement raises questions
With memory and re-use i did have a super naive C linker / loader that would statically link all programs and share identical functions on load (it would take a hash over all the binary code in a function and all the other functions it called and add them to an object store.).
Theoretically for basic cases when the binary gets recompiled with the same static library you get the de-duplication from dynamic libraries plus inlining and versioning working (just loosing the de-duplication).
I doubt it would ever work well enough for production use (first load of a program) and i got side tracked dealing with edge cases but it might be something I should poke again.
