• Nathan Chancellor's avatar
    s390/boot: vmlinux.lds.S: handle '.rela' sections · 64d590a2
    Nathan Chancellor authored
    When building with CONFIG_LD_ORPHAN_WARN after selecting
    CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there are several warnings from
    arch/s390/boot/head.o due to the unhandled presence of '.rela' sections:
    
      s390-linux-ld: warning: orphan section `.rela.iplt' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.head.text' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.got' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.data' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.data.rel.ro' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.iplt' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.head.text' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.got' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.data' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
      s390-linux-ld: warning: orphan section `.rela.data.rel.ro' from `arch/s390/boot/head.o' being placed in section `.rela.dyn'
    
    These sections are unneeded for the decompressor and they are not
    emitted in the binary currently. In a manner similar to other
    architectures, coalesce the sections into '.rela.dyn' and ensure it is
    zero sized, which is a safe/tested approach versus full discard.
    Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
    Tested-by: default avatarJustin Stitt <justinstitt@google.com>
    Link: https://lore.kernel.org/r/20240207-s390-lld-and-orphan-warn-v1-6-8a665b3346ab@kernel.orgSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    64d590a2
vmlinux.lds.S 2.75 KB