Discussion:
Linking the amd64 Kernel with ld.lld (further more have the default system linker as ld.lld)
(too old to reply)
Adam Steen
2017-12-15 02:27:56 UTC
Permalink
Hi All

Do you know if its possible to link the amd64 kernel with ld.lld? and
if so would you change LD?= in sys.mk?

I haven't been able to find anything about this besides "Bug 30815 -
linking OpenBSD/amd64 kernel" [1]. Which says the linked kernel
doesn't boot, thus if we can't link the kernel with ld.lld, the
default system linker is a non-starter.

Is this a direction the project wants to head?

Cheers
Adam

[1] https://bugs.llvm.org/show_bug.cgi?id=30815
Stuart Henderson
2017-12-16 20:40:03 UTC
Permalink
Post by Adam Steen
Hi All
Do you know if its possible to link the amd64 kernel with ld.lld? and
if so would you change LD?= in sys.mk?
I haven't been able to find anything about this besides "Bug 30815 -
linking OpenBSD/amd64 kernel" [1]. Which says the linked kernel
doesn't boot, thus if we can't link the kernel with ld.lld, the
default system linker is a non-starter.
Is this a direction the project wants to head?
Cheers
Adam
[1] https://bugs.llvm.org/show_bug.cgi?id=30815
There are definitely some advantages to switching to lld. espie@ made a
bunch of fixes in ports-land for this.

Seems like it would be easy enough to test whether an amd64 kernel
linked in this way is bootable. The method in the ticket you linked
should be good enough for a test.

Note that OpenBSD/arm64 is all clang/lld, binutils is not built there.
Loading...