I had not realized that gcc 11 was popped into rawhide last week and have spent a good bit of time trying to figure out what changed in the kernel, and why no one else was seeing it. Looks like gcc11 is the culprit, and kernels will not build in rawhide/eln on aarch64 with: WARNING: modpost: vmlinux.o (__patchable_function_entries): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. ld: .init.data has both ordered [`__patchable_function_entries' in init/main.o] and unordered [`.init.data' in ./drivers/firmware/efi/libstub/vsprintf.stub.o] sections ld: final link failed: bad value make: *** [Makefile:1175: vmlinux] Error 1 This code has not changed upstream, and builds fine on f33. To be clear, this means that no kernels have been built for Rawhide or ELN in a week now.
As I've asked privately, please attach main.i and vsprintf.i, ideally from both f33 and f34 build of the same kernel, and say the exact gcc command line used to compile those. I've tried to reproduce, but the kernel fails to build far before that on aarch64 (fedora-rawhide-aarch64 mock): Processing /builddir/build/BUILD/kernel-5.10-rc6/linux-5.10.0-0.rc6.90.fc34.aarch64/configs/kernel-5.10.0-x86_64-debug.config ... Found unset config items, please set them to an appropriate value CONFIG_KCSAN=n error: Bad exit status from /var/tmp/rpm-tmp.RLqtOw (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.RLqtOw (%prep)
Yes, the KCSAN bit doesn't get exposed until gcc 11 is used, that was updated, rc6 is over 2 weeks old. https://kojipkgs.fedoraproject.org//work/tasks/4249/57444249/kernel-5.10.0-98.fc34.src.rpm is much more recent, and has the KCSAN config set correctly. I am trying to get your builds, I was given access to a machine today, though I am also trying to get 5.10 into another repository and built so that people can use it and test it since rawhide fails, as well as work through the merge window, all while "on PTO". I did get your response, but the bug was opened because a number of people have been asking about the issue, and this was something I could point them to.
There is one possible issue related to the -fpatchable-function-entry=2 stuff when gcc is configured against latest binutils, see https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561974.html Whether that is all or not, no idea.
There is a duplicate section with differing flags in main.o that isn't there on the gcc10 machine. [19] __patchable_function_entries PROGBITS 0000000000000000 0015f8 000008 00 WAL 1 0 8 [20] .rela__patchable_function_entries RELA 0000000000000000 04dcb0 000018 18 I 76 19 8 [21] __patchable_function_entries PROGBITS 0000000000000000 001600 000150 00 0 0 8
Yes Jeremy. I think that's unexpected fallout from some of HJ's GCC changes. Jakub's patch is supposed to address that, but we want to consult with HJ on whether or not gas is supposed to handle this case more gracefully.
I am guessing this patch was not included in gcc-11.0.0-0.10.fc34 ?
It is included there.
Hmm, okay, this is not the complete fix then: koji build used gcc aarch64 11.0.0-0.10.fc34 Error now shows as ld: .init.data has both ordered [`__patchable_function_entries' in init/main.o] and unordered [`.init.data' in ./drivers/firmware/efi/libstub/vsprintf.stub.o] sections ld: final link failed: bad value So we do not get the "WARNING: modpost: vmlinux.o (__patchable_function_entries): unexpected non-allocatable section.", but the build still fails.
Note, I'm aware of linker issues affecting both s390 and ppc builds. Nick has been notified but he's already on PTO and then we've got the shutdown. So I don't really expect those issues to be fixed before the new year. The point is I don't really expect kernel builds to be successful on multiple architectures until the start of the year. Yes, this sucks.
I don't know if this is a kernel bug or binutils bug, filed https://sourceware.org/bugzilla/show_bug.cgi?id=27098 so that H.J. can comment on it.
I tested the patch from https://sourceware.org/bugzilla/show_bug.cgi?id=26256 (https://sourceware.org/bugzilla/attachment.cgi?id=13070), after building and updating binutils I don't see anymore the error on aarch64 kernel build. I'm changing the component, hope this is ok now.
OK - I have imported the patch into rawhide. The upstream version still has a problem with creating new linker testsuite failures, but I do not believe that this is because of a problem with the patch itself, just the new tests. So for this update I have just imported the fix, but not the new tests. A rebase is due in a month which will bring in the fixed tests as well.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.