Ah, that brings me to something else that someone like jart might want to take on:
# bringing static linking for C into the 21st century
What's wrong with static linking in C? Well, it's still stuck with 1970s semantics, while dynamic linking has much nicer semantics. Specifically:
- static linking flattens the dependency
tree, which causes
- symbol collision issues
- also, there's no RPATH equiv. for static
linking
My thinking is to: - write dependency metadata (-lfoo, rpath,
-L/...) into a "hidden" .o that has just
this metadata encoded in it
- make the static linker look for that
metadata in dependencies and resolve
conflicts the same way as in dynamic
linking
- for each link-edit, including the final
link-edit of the executable, require
only that direct -lfoo dependencies be
listed
Well, anyways, it's a lot to ask :(