+ if [ "${kversion}" == "4.6.7" ] ; then
+ # Hacky patch to deal with the following build error:
+ # Cannot find symbol for section 7: .text.unlikely.
+ # kernel/kexec_file.o: failed
+ # make[1]: *** [scripts/Makefile.build:291: kernel/kexec_file.o] Error 1
+ #
+ # This error happens with binutils 2.36 and 2.37, but should probably not
+ # be an issue with binutils 2.38.
+ # @see https://github.com/linuxppc/issues/issues/388
+ # @see https://github.com/bminor/binutils-gdb/commit/c09c8b42021180eee9495bd50d8b35e683d3901b
+ #
+ # There is some sort of config (unspecified in past discussions) which
+ # provokes the error, and there was never a potential fix merged in
+ # this discussion, in part because the build systems of the kernel
+ # switched to objtool instead.
+ #
+ # @see https://lore.kernel.org/all/20210215162209.5e2a475b@gandalf.local.home/
+ #
+ sed -i 's/return txtname;/return shdr0->sh_size ? txtname : NULL;/' scripts/recordmcount.h
+
+ # After applying the above patch, the build continues but fails with
+ # head64.c:(.text.exit+0x5): undefined reference to `__gcov_exit'
+ #
+ scripts/config --disable CONFIG_GCOV_KERNEL
+ fi
+