Alan Modra <amo...@gmail.com> writes: > On Thu, Nov 15, 2018 at 11:47:52PM +1100, Michael Ellerman wrote: >> Alan Modra <amo...@gmail.com> writes: >> >> > On Wed, Nov 14, 2018 at 01:32:18PM +1030, Joel Stanley wrote: >> >> I wasn't sure where this should go or if the ordering matters. >> > >> > The usual answer is: "Look at where the section goes in the standard >> > linker scripts." But that doesn't apply here. The section will be >> > empty for a kernel build so it doesn't matter where it goes. >> >> If it's empty why don't we just discard it? > > That can be a recipe for finding linker bugs. Not that I'm against > you finding linker bugs. ;-)
Seems we might have found a linker bug :) With a binutils 2.29 toolchain discarding .branch_lt causes a segfault when linking: http://kisskb.ellerman.id.au/kisskb/buildresult/13618838/log/ /kisskb/src/scripts/link-vmlinux.sh: line 85: 74627 Segmentation fault (core dumped) ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} -T ${lds} ${objects} That toolchain is here: https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/5.5.0/x86_64-gcc-5.5.0-nolibc-powerpc64-linux.tar.xz It seems to be better with binutils 2.30, it doesn't crash but still doesn't link: http://kisskb.ellerman.id.au/kisskb/buildresult/13620269/log/ /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: linkage table error against `0002bf55.xdp_rxq_info_reg_mem_model' /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: stubs don't match calculated size /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: can not build stubs: Bad value make[1]: *** [/kisskb/src/Makefile:1036: vmlinux] Error 1 So I guess I'll take this version of the patch for now. cheers