Open koachan opened 4 years ago
You can try doing as I did here.
The basic idea is to generate .o files using zig and then use any other linker.
In scope of the Zig project:
Out of scope of the Zig project:
If you want this issue to be a proposal, then it would be closed now. However instead I'll leave it open and turn it into the use case of linking for powerpc64 ELFv1 ABI.
Thanks! I guess I'll just try to make everything work on ELFv2 first, for now.
Necro'ing this issue to add this great blog post by Maskray about PPC linker details.
My hope is one day I can run Zig on my G5 (just for fun).
Hi, I'm trying to add linux-powerpc64 support to the compiler. I've gotten it far enough that the stage1 zig could compile things, but now I'm having problems with linking since apparently, lld doesn't support powerpc64 ELFv1 ABI (which Debian/ppc64 uses). Is there any way to specify an alternate ld binary to get around this issue?
More details:
With Zig code, lld generates wrong target for branches:
Annotated objdump output of hello, for the relevant parts:
Trying to do it with C and clang shows that lld doesn't support ELFv1 ABI: