]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
s390: vmlinux.lds.S: handle '.data.rel' sections explicitly
authorNathan Chancellor <nathan@kernel.org>
Thu, 8 Feb 2024 00:14:54 +0000 (17:14 -0700)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 14 Feb 2024 12:50:52 +0000 (13:50 +0100)
When building with CONFIG_LD_ORPHAN_WARN after selecting
CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there are a lot of warnings around
'.data.rel' sections:

  s390-linux-ld: warning: orphan section `.data.rel' from `kernel/sched/build_utility.o' being placed in section `.data.rel'
  s390-linux-ld: warning: orphan section `.data.rel.local' from `kernel/sched/build_utility.o' being placed in section `.data.rel.local'
  s390-linux-ld: warning: orphan section `.data.rel.ro' from `kernel/sched/build_utility.o' being placed in section `.data.rel.ro'
  s390-linux-ld: warning: orphan section `.data.rel.ro.local' from `kernel/sched/build_utility.o' being placed in section `.data.rel.ro.local'

Describe these in vmlinux.lds.S so there is no more warning and the
sections are placed consistently between linkers.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240207-s390-lld-and-orphan-warn-v1-2-8a665b3346ab@kernel.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/vmlinux.lds.S

index e32ef446f45115faede66cc0d11c32d9440eb73b..d231a3faf9818d2bcc3475317ab51b219b6b13eb 100644 (file)
@@ -59,6 +59,9 @@ SECTIONS
        } :text = 0x0700
 
        RO_DATA(PAGE_SIZE)
+       .data.rel.ro : {
+               *(.data.rel.ro .data.rel.ro.*)
+       }
 
        . = ALIGN(PAGE_SIZE);
        _sdata = .;             /* Start of data section */
@@ -73,6 +76,9 @@ SECTIONS
        __end_ro_after_init = .;
 
        RW_DATA(0x100, PAGE_SIZE, THREAD_SIZE)
+       .data.rel : {
+               *(.data.rel*)
+       }
        BOOT_DATA_PRESERVED
 
        . = ALIGN(8);