3 ms·
The thing that's missing is static link semantics that don't suck.
by cryptonector 6y ago
The thing that's missing is static link semantics that don't suck.
- cosmojg 6y agoSo let's fix the problem! How can we get better semantics? Have any hypothetical solutions in mind?
- cryptonector 6y agoI've outlined it already, but let me do it again for you: 1) when making a static link archive (a .a file), include a .o with a static symbol(s) whose values(s) records the metadata that ELF would have recorded, which here is: a) dependencies, b) how to find them, c) the mapfile / version-script (at least which symbols are symbolic, protected, or demoted to local, and which, if any, are interposers. 2) on final link-edits only the direct dependency -lfoo arguments should be needed, and then link-editor should find the dependencies' dependencies... by looking at the metadata recorded in the .a files. Really, it's very simple. libstool is a very bad attempt at layering this on top of the linker (recording metadata in .la files), but it doesn't work well. This functionality has to be in the linkers.
- saagarjha 6y agoIs it literally called libstool…