Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What advantage does sibling libs provide over static linking?


This becomes the same question as when and why are dynamic libraries useful over static linking!

Suppose whatever you are shipping consists of five executables, which have a few hundred kilobytes of their own code and a 5 megabyte library. If they statically absorb the library, they all become 5.5 megabyte binaries.

Adjust that to whatever sizes you would consider relevant.

You can make it clear when a bug is fixed in a library or one of the executables. If you have a patch update, users can see that only a shared library changed or only a certain executable.

When hunting a bug, you may have certain possibilities (within limits that depend on your library API maintenance), like trying an older executable with the same library, or older library with the same executable.


Bundle the executables into a single larger mega-executable with symlinks as the “true” entrypoint name.


Meaningless question. Simetimes it's what you need. Sometimes it's not. Sometimes you want to write the arabic digit 3, sometimes you want to write the word three. What is the advantage of writing out three? The advantage is whatever the advantage is in those situations when you want it. The possible details are infinite.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: