zlacker

[return to "The state of binary compatibility on Linux and how to address it"]
1. sylwar+p1[view] [source] 2025-04-01 22:38:52
>>generi+(OP)
This article missed a critical point which is "the right way" to select a glibc ABI version: see binutils ld documentation, second part of the page related to VERSION support. This must include glibc internal symbols.

This will allow to craft ELF binaries on a modern distro which will run on "older" distros. This is critical for games and game engines. There is an significant upfront only-once work in order to select an "old" glibc ABI.

The quick and dirty alternative being having a toolchain configured to link with an "old" glibc on the side.

This article missed the -static-libstdc++ critical option for c++ applications (the c++ ABI is hell on earth), but did not miss the -static-libgcc and the dynamic loading of system interface shared libs.

◧◩
2. AndyKe+V7[view] [source] 2025-04-01 23:43:29
>>sylwar+p1
One of the features Zig provides is ability to target any glibc version. See https://github.com/ziglang/glibc-abi-tool/ for more details on how this is solved.
◧◩◪
3. forres+Pb[view] [source] 2025-04-02 00:33:20
>>AndyKe+V7
You’re my hero for this.

One of my side projects is building a toolchain to enable C++ cross-compile using the Zig header/source libs.

I didn’t love Zig as a Clang++ replacement because it has a bit too much magic. And it might go ahead? But the underlying library code is a God send

[go to top]