11 comments

[ 3.6 ms ] story [ 17.9 ms ] thread
And it fixes a bug about debug output. Seems like a bigger deal than fast.
Zig honestly blows my mind. I think it's clearly the best next gen language because of the build system alone.
If I recall correctly, this is one of the final pieces that allows zig to be used as a fully self-contained cross-compiling C toolchain (once its linker is enabled for more platforms / formats)
The more I hear about Zig, the more I appreciate it. Its vertically integrated stack (with the custom linker and code-generation backends) stands out to me as a really compelling feature that enables interesting optimizations. The compiler is also much easier to interact with in a consistent way compared to C. I've been using it as an experimental backend for my language project with great results.
Between mold and this, the linker space appears to be going through a renaissance.

Does anyone know if it’s reasonably easy to use elf2 as a standalone linker in a c/c++ toolchain? Or is it specially built just for Zig?

I don't really have much interest in Zig the language, but Zig as a standalone C/C++ compiler is pretty great.

I'm using it as a cross-compiler for linux-arm64 because its much simpler to download a single archive and extract it somewhere than to waste a bunch of time on guessing how each different Linux distro does ARM64 cross compilers (or doesn't in the case of Fedora).

Same for me.

The more Zig-the-language is hyped, the more I see it doesn't bring anything of interest. Zig-the-toolchain, on the other hand, is neat.

I’ve been using it for an embedded project to target arm thumb and the typical x86-64 hosts that communicate with a protobuf based protocol. It’s absurdly convenient to be able to just give windows users the repo, zig binary, and tell them to run ‘zig build’.
Just going to mention the book Linkers and Loaders by John R. Levine, I'm not sure if there's anything comparable to it.
Seems like we spoke too soon. Latest results shows that it's not as great as it seems