2 ms·
The right way to solve this problem would be to teach the linker to link against the set of glibc symbols that existed as of a particular version number or date
by quotemstr 7y ago
The right way to solve this problem would be to teach the linker to link against the set of glibc symbols that existed as of a particular version number or date. Then you'd just pass a flag (along with a preprocessor macro, so the headers would know to define the right version of the linker symbols) specifying this version target when you built your program. For want of this relatively simple toolchain feature, we have people statically linking entire C libraries. It's a shame.
You can do a moral version of the same thing using linker scripts, but nobody bothers with linker scripts.
- glandium 7y agoThe macOS SDK does this better. It is indeed a shame that the glibc doesn't care.