Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390: vmlinux.lds.S: Reorder sections

In the upcoming changes, the ELF_DETAILS macro will be extended with
the ".modinfo" section, which will cause an error:

>> s390x-linux-ld: .tmp_vmlinux1: warning: allocated section `.modinfo' not in segment
>> s390x-linux-ld: .tmp_vmlinux2: warning: allocated section `.modinfo' not in segment
>> s390x-linux-ld: vmlinux.unstripped: warning: allocated section `.modinfo' not in segment

This happens because the .vmlinux.info use :NONE to override the default
segment and tell the linker to not put the section in any segment at all.

To avoid this, we need to change the sections order that will be placed
in the default segment.

Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506062053.zbkFBEnJ-lkp@intel.com/
Signed-off-by: Alexey Gladkov <legion@kernel.org>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://patch.msgid.link/20d40a7a3a053ba06a54155e777dcde7fdada1db.1758182101.git.legion@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Alexey Gladkov and committed by
Nathan Chancellor
8d18ef04 aa943a28

+5 -5
+5 -5
arch/s390/kernel/vmlinux.lds.S
··· 209 209 . = ALIGN(PAGE_SIZE); 210 210 _end = . ; 211 211 212 + /* Debugging sections. */ 213 + STABS_DEBUG 214 + DWARF_DEBUG 215 + ELF_DETAILS 216 + 212 217 /* 213 218 * uncompressed image info used by the decompressor 214 219 * it should match struct vmlinux_info ··· 243 238 QUAD(kasan_early_shadow_p4d) 244 239 #endif 245 240 } :NONE 246 - 247 - /* Debugging sections. */ 248 - STABS_DEBUG 249 - DWARF_DEBUG 250 - ELF_DETAILS 251 241 252 242 /* 253 243 * Make sure that the .got.plt is either completely empty or it