Re: [PATCH 00/11] s390: Support linking with ld.lld

From: Heiko Carstens
Date: Fri Feb 09 2024 - 06:23:25 EST

Hi Nathan,

> This series allows the s390 kernel to be linked with ld.lld (support for
> s390 is under review at [1]). This implicitly depends on [2], which was
> created and sent before it was realized that this series was necessary.
> There is one outstanding issue due to something that ld.lld does not
> support that the kernel relies on:
> ld.lld: error: drivers/nvme/host/fc.o:(__bug_table): writable SHF_MERGE section is not supported
> This was changed in the kernel in commit e21f8baf8d9a ("s390/bug: add
> entry size to the __bug_table section"). Is this change truly necessary?
> I selectively applied a revert on top of current mainline and I did not
> observe any issues with either Clang or GCC.

No it is not necessary. As the original patch stated this was a pre-req
patch for objtool, for which we still don't have support. This (or
something different) might be needed. But for now this can easily be

> Then build the kernel with 'LD=ld.lld' in addition to whatever command
> line you use (I tested both Clang and GCC). I can boot an ld.lld linked
> kernel built with both compilers in QEMU with this series.
> [ 1.386970] Linux version 6.8.0-rc3-00043-g05761ede85d6-dirty (nathan@xxxxxxxxxxxxxxx) (s390-linux-gcc (GCC) 13.2.0, ClangBuiltLinux LLD 19.0.0) #1 SMP Wed Feb 7 16:51:12 MST 2024
> [ 0.871923] Linux version 6.8.0-rc3-00043-g05761ede85d6-dirty (nathan@xxxxxxxxxxxxxxx) (ClangBuiltLinux clang version 19.0.0git ( 417075e56aeba5a5b20301c7bfeba9c2a800982b), ClangBuiltLinux LLD 19.0.0) #1 SMP Wed Feb 7 17:01:22 MST 2024

Tested, and works for me. Thanks a lot for your work. This is highly

I applied this series internally to get some CI runs over the weekend, and
push it to our external repository beginning of next week. As suggested by
you I reverted the commit you mentioned above, and also removed ENTRY from
our vdso linker scripts, similar to what you did already for powerpc (see
patches below).

Please feel free to send patches for both of the issues, and I'll replace
my patches with your patches.