Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp650245rdh; Wed, 7 Feb 2024 16:15:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsLImjkSnexYpvuBD9LnoV1uxIOCATvqgr28FsN/04OKwGeJO8MQqLU1+ocheE22VbstgH X-Received: by 2002:a17:90a:4b4f:b0:296:f6d3:db5d with SMTP id o15-20020a17090a4b4f00b00296f6d3db5dmr868716pjl.4.1707351335440; Wed, 07 Feb 2024 16:15:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351335; cv=pass; d=google.com; s=arc-20160816; b=n4ikfDUoVw1LE2MBmCclS2w7g3cfWgGkNG65ai162JsNdJef57u9mowuU4P0h0Ta6Q ZkpoUy2k2lboURO3lN1uyCQwm3hiWy1sheAqlIoOomfx5lnHcuZ+IOFLW0qiNwYiyoiK RzwQJMulnezrfQiY4BFvm7ehrBGgThyAFTKBxkdvT3tOA1CCM4oqaYuP2e67kA8wbeFo K2SOvTMtS/WBD5NDhkVX9GhDn5DitCqQFSpro7nUTiI0wO4cc1Z/shhUT2PaE8ahce4B PkJEMSl9MR7ahIlhWpDpZP2hPks3hHyAo1HjvUggoQwK11db1HtqO7IMdfAmldi7oNd5 +VuA== 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=ok4nS8IUHG4QgIbwXkbe6TGsdnNU2xIJsZX0liQJuU8=; b=mvY/SU3qclaSsCiSqeJoXubT9rNH5RkkguCBxEx3fXgW+LDzwXO7o1BikEju7Sc9nN Uf6Vi+fUpMqS6au+hS8lGawqrXz8Z36KyunEW3dF2mi71Z5Ebh4GkvCRDLdMu2tG7xv3 MFLH5BVGfTLsxyhWG3jAUwkrid0eiCIZlNIQsYzg7C0KHTFVie9CvdRW6erYldV9QLap hiPkb7qDVxrVhQk4j7d6QgHXSgBChPUVnLYpzN6Wh2CmeczTWeLmNI+DEwU3DbcL+CDP g/MySb27iPl7QEGbTRAZ4OuppJgXxsgrKAG/Nltak5xPCR70yW9l64Fsl4nor5zhaUs6 Ek8Q==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57318-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUAsg5UcSbO0m56KrMyvISXqSs+c75mgyGXoXszLpVprK+Ba7SGu80gP09gs8UKrWb/yYzsF6SFTGDBJH+uAKIN6qby5DE06Q73WfspSw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id qj16-20020a17090b28d000b0029679474eaasi68355pjb.12.2024.02.07.16.15.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:15:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57318-linux.lists.archive=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 8C936B225B4 for ; Thu, 8 Feb 2024 00:15:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC5FA12E61; Thu, 8 Feb 2024 00:15:07 +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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 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) -- 2.43.0