On Sat, 2022-08-27 at 15:27 +0200, Ard Biesheuvel wrote: > It does have a relation: the signing tool will complain because the > PE/COFF metadata goes out of sync, like so > > SBSIGN arch/loongarch/boot/vmlinux.efi.signed > warning: data remaining[20754944 vs 20755016]: gaps between PE/COFF > sections? > > This is because of the *(.rela.dyn) section created by the linker, > which is appended after the .data section, and so the PE/COFF .data > section size does not match the file size. > > *However*, you explained to me that vmlinux is not a PIC binary, and > the link should be non-PIE as well. So this looks like another > toolchain issue to me, that you may want to look into. In my builds: With Binutils 2.39 and GCC 12, vmlinux rela.dyn contains 48 zero bytes (or 3 R_LARCH_NONE relocations, which is defined "do thing" and is ignored by ld, ld.so, and kernel module loader). With Binutils trunk and GCC trunk, rela.dyn does not exist in vmlinux.(But for using the trunks of Binutils and GCC we'll need to either disable CONFIG_MODULES or apply [1].) [1]:https://lore.kernel.org/loongarch/20220827175436.156464-1-xry111@xxxxxxxxxxx/T/ -- Xi Ruoyao <xry111@xxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University