3 ms·
> It didn't have to be done this way. That ought to be a tagline at the bottom of every man page in section 2 and 3. It really disappoints me that making fund
by quotemstr 7y ago
> It didn't have to be done this way.
That ought to be a tagline at the bottom of every man page in section 2 and 3.
It really disappoints me that making fundamental improvements to the GNU/ELF/etc.-family programming model is so difficult. I've already commented about the benefits of a two-level namespace. The article we're discussing is about a bad default in linker interfaces. There are tons of other systemic problems that nobody is interested in solving because the default response to every suggestion is "no".
Consider, for example, symbol interposition: why should programs go through the GOT to access their own symbols? Yes, yes, in theory, you can use LD_PRELOAD to interpose symbols, except you actually can't, because Clang aggressively inlines [1], which means that whether your interposed function is actually called in a given context is a crapshoot. We're paying for intra-library symbol interposition even though it's become unreliable. Yes, you can set symbol visibility to hidden by default or use a linker script to trim your export list, but most people don't know to do that. Why is the default so bad? Why do we have to live with bad defaults for decades?
[1] https://lists.llvm.org/pipermail/llvm-dev/2016-November/107625.html https://lists.llvm.org/pipermail/llvm-dev/2016-November/1076...
- codetrotter 7y ago> It really disappoints me that making fundamental improvements to the GNU/ELF/etc.-family programming model is so difficult. [...] There are tons of other systemic problems that nobody is interested in solving because the default response to every suggestion is "no". The expertise of yourself and others on this subject might be welcome in upcoming Unix-like OSes that are being written like: - https://www.redox-os.org/ https://www.redox-os.org/ - https://github.com/SerenityOS/serenity https://github.com/SerenityOS/serenity I am involved in neither of those but I follow them both with interest.
- quotemstr 7y agoIt's an attractive idea. Another project I've been considering is implementing a unified buffer cache in OpenBSD. It's just really hard to find motivation to do stuff like that when user counts are so low and you still risk running into "culture of no"-related roadblocks.
- saagarjha 7y agoWell, we have a strange case where functions are visible externally unless marked with static, which means they cannot be removed, but inside a module there’s a need for symbols to be PIE which makes the use of a GOT useful when functions cannot be inlined. FWIW, I feel that symbol interposing is usually a lot more reliable when you’re using for inter-library calls rather than intra- library calls.