From patchwork Thu Feb 8 00:14:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198136 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2587334dyb; Wed, 7 Feb 2024 16:16:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwJKQSLmxTt/gclw6vbsWRpioUvKecG8i/CKapRINYelTGgfGR/G2EJiVn+h15cYkrWO6y X-Received: by 2002:a05:6a20:841c:b0:19e:29c2:f8db with SMTP id c28-20020a056a20841c00b0019e29c2f8dbmr5388984pzd.47.1707351399963; Wed, 07 Feb 2024 16:16:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351399; cv=pass; d=google.com; s=arc-20160816; b=vQVxQFFqV/kyY9T93BJwn6MgWXKEsx528/zuDbHEngUUYJEXbd7wpYcF2+AaUWfam1 i5zSZUZNz2ybpR2+r/65FOWmyNZuMGKX+PsVnM6rijehSRfLY30SVLmd1m0YWrpvwCJ9 mT2L2RmD8HjP4j++MHxOxVrMvZEHE61rF6I8U5izurNffjj5sa4tOzjFaZVtlNLsEFb7 uqeB8H5InYhmuSqgVu7/4q2fbFRDximhBBdPGVr8yJjLmbFbOD3jbd/0oFcM4+qoScSt 8BGkl4+Uezg3PmtNGPqATwkZAoAOPZQh5eckc54FP073LBXPoCfbc1QX7aIaP7/vl5Cr C1Ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=33cwo3aO9NaFzyHmARhXtBrNiAr8XrKGGsqIGVoBCow=; fh=NKAOxbFjP+PaFO52qlNExjbp9Wn9U0eA5a90S1lv/gI=; b=i+iLmg2WUwKN/vagKnKnGPSW+bj5/bPts7mH4y73lhF8gri7C3c8PG3gV5Q0xmTk94 0K9zt3wN8whav2mDnsw5onzz8z9tkdj+PF0H9zABfFK31OwOvNQGPuC3/39TjrA/y/Ol tZEmw4Aa5pDT3ypOO7SPvLg8E5VY17O3sXhBkUz2EdnYsoCFYoNhrOAPTVtZ3I3AU7SS R7/t98BJzlwv3991kMmQK/BVJO4ODZwWp/seHaQLxj0fn+GorZHtKBZmHseEjwa477Aq 8wior9iGQflat2MTvCPcedG9FcvL+nM37nm31kr6bwHmB1xrpkOnY06RmuGNLA/CyJ+8 ElwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UmzQeZ1J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57318-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57318-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUkAifZJnU9YGPZ9GZ1L4AAGz3wNRiRIVYCtkEr+b2V4a98mj5rK2AOPcyo37fsKMUNurQpSiPPgw4aBpd9WPeFuFKlAg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i13-20020a170902c94d00b001d704fdd728si2898119pla.532.2024.02.07.16.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57318-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UmzQeZ1J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57318-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57318-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 14098B22A9D for ; Thu, 8 Feb 2024 00:16:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A834320334; Thu, 8 Feb 2024 00:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UmzQeZ1J" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6C90D53C; Thu, 8 Feb 2024 00:15:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351306; cv=none; b=MrPXQxM1OiiS9l7qsFbGAr0RJbvETQj8X4Qv3Wr8r2a5cgLubbBVLU41tjCnYUNgHYrTYdf7h7Coomo1CjeUat7DOh84wlIOcNDsMqbyZMpTG1JLl9Pzl0uFKRffDkv4u0ookgGAaSOM2bk1zf8Ciy4OnRYERaq4fX4Y3yJH4wE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351306; c=relaxed/simple; bh=aTb4pn0CAwwvBRJP9l28pMh6aiS0FZ7vCx6nye/a3mY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IwuTH7DxozE3lPPj/7vQE4SSshi+48NjVFR3A5lyLKOCcWcVu4q4e1/epS3DetpiV5VUfR9qGglokE6soXKQu7ptA6dZyosb+Qm3YX0YVxM2htJ3gtRQDZLWyLnc3iRsPvlv4RYvmOFc+UwlUQfptpX42n0CwkmcKr0uPa3SXmk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UmzQeZ1J; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86D99C43394; Thu, 8 Feb 2024 00:15:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351306; bh=aTb4pn0CAwwvBRJP9l28pMh6aiS0FZ7vCx6nye/a3mY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=UmzQeZ1J/MNXygqXAlloamg9yP+I+4vauU3qPvSvews15F3rqQcwYKE8rvrfhE7jz +oVQKSk4FuekTxJ2L3/A5fFhpX9I/O1qIko7ZDF8JXEg2wuuZaM91UT/gfebQUIXsJ +h+rQ9d29G/kMYvoT8jHUu9nl3kQE9+F699Q8h2tvYZUS/BhUxapjnHWaesmpslhE8 1imGB/P/xXukEYLsX/yMlANwj8eYBLqbaTYx/dp3Qo37O3ZVDKcPpLzser7MKNyfis aoaPAPYjmHWl8dec5QA3wRqUAVXTw2FXVUApdeedm+teustMzeluQLkWoRfsQz6HbQ ncv/Yf581pFdA== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:14:53 -0700 Subject: [PATCH 01/11] s390: boot: Add support for CONFIG_LD_ORPHAN_WARN Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240207-s390-lld-and-orphan-warn-v1-1-8a665b3346ab@kernel.org> References: <20240207-s390-lld-and-orphan-warn-v1-0-8a665b3346ab@kernel.org> In-Reply-To: <20240207-s390-lld-and-orphan-warn-v1-0-8a665b3346ab@kernel.org> To: hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com Cc: borntraeger@linux.ibm.com, svens@linux.ibm.com, maskray@google.com, ndesaulniers@google.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1555; i=nathan@kernel.org; h=from:subject:message-id; bh=aTb4pn0CAwwvBRJP9l28pMh6aiS0FZ7vCx6nye/a3mY=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZNkrnPh9Omb8n66xZv3+5NKnc41uxtwzl2k8e/6U4 HSeyz0KHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAivwwYGXp73A6tCo06yX0x Rbl2f2zYgTDf7inLw8JX/7fXzjpXVcTI8EF2/TftJ/PO3ZY5OPvB96vZIdILF7z+H6Rz9v91u6J FbqwA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287701859767731 X-GMAIL-MSGID: 1790287701859767731 arch/s390/boot/vmlinux uses a different linker script and build rules than the main vmlinux, so the '--orphan-handling' flag is not applied to it. Add support for '--orphan-handling' so that all sections are properly described in the linker script, which helps eliminate bugs between linker implementations having different orphan section heuristics. Signed-off-by: Nathan Chancellor --- arch/s390/boot/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index c7c81e5f9218..ace0bda1ad24 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -73,11 +73,12 @@ $(obj)/bzImage: $(obj)/vmlinux $(obj)/section_cmp.boot.data $(obj)/section_cmp.b $(obj)/section_cmp%: vmlinux $(obj)/vmlinux FORCE $(call if_changed,section_cmp) -LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup $(if $(CONFIG_VMLINUX_MAP),-Map=$(obj)/vmlinux.map) --build-id=sha1 -T +LDFLAGS_vmlinux-$(CONFIG_LD_ORPHAN_WARN) := --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL) +LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y) --oformat $(LD_BFD) -e startup $(if $(CONFIG_VMLINUX_MAP),-Map=$(obj)/vmlinux.map) --build-id=sha1 -T $(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS_ALL) FORCE $(call if_changed,ld) -LDFLAGS_vmlinux.syms := --oformat $(LD_BFD) -e startup -T +LDFLAGS_vmlinux.syms := $(LDFLAGS_vmlinux-y) --oformat $(LD_BFD) -e startup -T $(obj)/vmlinux.syms: $(obj)/vmlinux.lds $(OBJECTS) FORCE $(call if_changed,ld)