This should be reproducible with many Linux versions, but I have just checked some recent commits, e.g. dcf8e5633e2e69ad60b730ab5905608b756a032f today % git remote -v | grep origin origin https://github.com/torvalds/linux (fetch) origin https://github.com/torvalds/linux (push) % make O=/tmp/linux/ppc64le ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- -j60 defconfig all % readelf -Wr /tmp/linux/ppc64le/arch/powerpc/kernel/vdso/vdso64.so.dbg Relocation section '.rela.dyn' at offset 0x14f0 contains 4 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000000 0000000000000000 R_PPC64_NONE 0 0000000000000000 0000000000000000 R_PPC64_NONE 0 0000000000000000 0000000000000000 R_PPC64_NONE 0 0000000000000000 0000000000000000 R_PPC64_NONE 0 The linker script is innocent. I don't reproduce the problem with other ports (though I know that the riscv port produces R_RISCV_NONE in certain scenarios) make O=/tmp/linux/x86_64 -j60 defconfig all && readelf -Wr /tmp/linux/x86_64/arch/x86/entry/vdso/vdso64.so make O=/tmp/linux/aarch64 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 -j60 all && readelf -Wr /tmp/linux/aarch64/arch/arm64/kernel/vdso/vdso.so make O=/tmp/linux/riscv64 ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- -j60 defconfig all && readelf -Wr /tmp/linux/riscv64/arch/riscv/kernel/vdso/vdso.so make O=/tmp/linux/s390x ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- -j60 defconfig all && readelf -Wr /tmp/linux/s390x/arch/s390/kernel/vdso64/vdso64.so
Despite the use of a powerpc64le-linux compiler, defconfig builds an ELFv1 kernel not ELFv2. So this is a powerpc64-linux problem triggerered by discarding .opd in the linker script.
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=365bf300da35c11e27bb8cdd3964f82e3d32f094 commit 365bf300da35c11e27bb8cdd3964f82e3d32f094 Author: Alan Modra <amodra@gmail.com> Date: Sat Sep 10 12:58:44 2022 +0930 PR29540, R_PPC64_NONE in .rela.dyn when linking Linux vdso PR 29540 * elf64-ppc.c (allocate_dynrelocs): Don't alloc space for relocs against discarded sections. (ppc64_elf_size_dynamic_sections): Use standard test for discarded sections. * elf32-ppc.c (allocate_dynrelocs): Don't alloc space for relocs against discarded sections. (ppc_elf_size_dynamic_sections): Use standard test for discarded sections.
Fixed for 2.40