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) From patchwork Thu Feb 8 00:14:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198133 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2587159dyb; Wed, 7 Feb 2024 16:16:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPxLAffTD6WOPEfj1X7HuxuTVRhwtLQbGomRwOk86wElHAT3AWe9CZLVPVN1enXegQKJ9P X-Received: by 2002:a05:6902:1b0e:b0:dc7:3362:4b31 with SMTP id eh14-20020a0569021b0e00b00dc733624b31mr3769404ybb.18.1707351377698; Wed, 07 Feb 2024 16:16:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351377; cv=pass; d=google.com; s=arc-20160816; b=KkOmHFceZo+nYu9xcul2yHdmdVaGyFsOOf/ob2gA4cDilAjTC8hspFfzvJqVEOdaXT CG7PZhZiV2sJtPJnZNzbyQ6L5NIH7Bt1KVKbEOuu4uiu9oLEGBlOMjdHvFCTREmY+y8Y F91Ec36yE2ndteihrflItx6VlaWhlXZBwIm3u0i2SAt68ESua0YVR5GKKEFvZW7AQAl0 +JdZxPqJ2oduh4CwLdbUJovwEdP94MXJUTSlSQSnOJYEuivYZcGID74D3rAB4EgHYHOb dgx4P7cOriHKJueltxwFfaAUnMKqKbjuzf9DOmyEiC3nkQF9SrvNZiPdHtlTWVKDji95 TUxw== 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=vMptkiDQ6pb0U7oanWdm3DEolJGZBHlhrN9Io4e14Lk=; fh=+0B8QQkH5hDFOSF7st9WLCA+EaQ12S0LqmY/sgQnMWU=; b=iuFfrwbHs5wkZht80KAXRVjThO63/7JhHDrgvelh7hXJZUTnHAYBCcuWQzXrJkKKSb R4o7mbhSz13sG1fSdhYJWudBxwbc3v72NOPvJraFAlHfe2M7QxohY4ZhpiOmQXM7g9vA wq7aawXet5VMz9hOmc2lS6o1dFI9KabP++njMz+hN/svrVUPse1x41llpFZ6ML7203mI B7DPwdofz6O6K/gZyx0wRUB+iMs0m7eHq8YEYTxdWg8sNfThUPZev11a1Lh8FWKH1w8+ lwPf2RKS10TSzgeTwjpRLATkFYRWw2UEHqQP3lVn88UkHpOmMyr5XpARChX/iKItssSQ zO7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hA8+DiPe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57319-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57319-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXSLSrAIqhnHZXZbEIPfQbhbxU5vAFdItvrs9Y2KLf04oxfWfJn4gw/1UfB7kk4eYPo9jrqr6uDPFwWBD2zPQgt5CwU9g== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m24-20020a05620a221800b007859d41cd29si2138678qkh.428.2024.02.07.16.16.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:16:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57319-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hA8+DiPe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57319-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57319-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 784361C2175D for ; Thu, 8 Feb 2024 00:16:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 423DE27459; Thu, 8 Feb 2024 00:15:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hA8+DiPe" 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 66A7611737; Thu, 8 Feb 2024 00:15:07 +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=1707351307; cv=none; b=VG8WUEPxPj3Ap++ObRmK8kP8vEan+2KiapcKryBDqeMXeziSz9y2g6zzG6J+qui9XLskqpeglg+MLxJnEJRTiXASz7xo/wcGinlW4/gZJ0M4dCgu9lI74lHXRtP4wYZEjfb+DboeqjuV4KfJLNQOQbNiv9iO0bVATAqErGanZKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351307; c=relaxed/simple; bh=6nAKdBNVuZF6DFmdTWgdfLbT5YqqyFnTFc0PCtVc7no=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aed9/sqDfBgUxNqUMQu1eNthBg7QpVKb28aFREA9vOFZ7hMajPWC03lAqhnw4ltuN+t1C7RFfXRKeK4hsbS1onjwIQk7FVo3lpcF0pIKbVN1Vc+HCsXKzvkydCcTCRlpiFD8coG2olNYgQv1u0LztQWcp9LMqVo8BTpoy/IiWZw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hA8+DiPe; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FF00C43390; Thu, 8 Feb 2024 00:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351306; bh=6nAKdBNVuZF6DFmdTWgdfLbT5YqqyFnTFc0PCtVc7no=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hA8+DiPeT/iFERysdie6DstYmrI9RLIi4uno7/7MHM7nN4UbKGNJKnQO+dZZC/880 DHYZUF3G99zPgvKkQH3fHozWRfeG4D4DsdsRX1CIAUoWcPIb/9oa1S0XaJsU6UI7rA Gs8JiXKB59Q2L9f8YYV+skGAnOHpscgIV1UwEPgAa7srpgzVx0/V37whlcFpyuuFUP EjSJNuv9KTBhNowf4mWyqt91yyCNhVzGZW1Gwig13XbxDkaENe+pA7tbdPDjfKOp7k cqJIu3nqW8tLY+QO5+Y/hcjIiofSq6ctuFfJVFxyUJ8CdWzZBpMuS66cdvOdKY0v8M FIqFC9JeY1i6g== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:14:54 -0700 Subject: [PATCH 02/11] s390: vmlinux.lds.S: Handle '.data.rel' sections explicitly 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-2-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=1553; i=nathan@kernel.org; h=from:subject:message-id; bh=6nAKdBNVuZF6DFmdTWgdfLbT5YqqyFnTFc0PCtVc7no=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZNlZeKPWHj3bsmm32I7tbALmN07censyX3bNjiXbD 3+7/upVbUcpC4MYF4OsmCJL9WPV44aGc84y3jg1CWYOKxPIEAYuTgGYyHx3RoajEy4uKhV5rt6X nc/pb7THm9GsQzKjtjb6RqCM69SpP48z/C/cZPA3rjlmv4m4jvvj6LfSRlvj5u1u+3PGoXutawJ DBzcA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287678386944606 X-GMAIL-MSGID: 1790287678386944606 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 --- arch/s390/kernel/vmlinux.lds.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index e32ef446f451..d231a3faf981 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -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); From patchwork Thu Feb 8 00:14:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198135 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2587260dyb; Wed, 7 Feb 2024 16:16:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXp2W5Y0ZcUkNh0JIEHEX3Rf5XqgzRnvCPtrBhRBgF+Ma8NjOQJEocqG+QxCE3j6Ql1q6D X-Received: by 2002:a05:6a00:26f8:b0:6e0:42b0:280d with SMTP id p56-20020a056a0026f800b006e042b0280dmr3872124pfw.28.1707351389863; Wed, 07 Feb 2024 16:16:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351389; cv=pass; d=google.com; s=arc-20160816; b=0YaLWZOr1jTM9fT89Pvob0LJEPjSyF/m6JcHPEYuk1n5XN+49iLkcNsrXVYld55w7x YglSCCWWJd6Wxd0YpDCrGwUfBEvfcSWv4+ZSR4rz5wHntt5KjQ7bqNcfrtkR96Ta6WXl HpI/hixx+1wjkgUZofOqo3jZ7URMkBl2cFtEPxdPOFNJDpY5WgzjUK6RzILOIqSKbmsW M2TlRm4eTbUelSnI3FP7ch45GHERYbk1X82QUtc9r11YMz2zWz5NPCXWlP47z/d8f1Qr aWtjXCOCzzW2pKLMXdUrrwBSuN0VoUHueYTHPHUx9Dy5aQFg2HCcTXp8kwtFca3aTKl5 CMAw== 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=odG0AjI0qa+8mc3r6S6xS3lJASW7hkCneX2bCsX4Sdo=; fh=gXCsjWtmdM8glXYQ1trNrT6GlbmB6zl36BgFFDn9tGg=; b=yQxZvDCbzagRtX0vI1oQqjR1YdSYcwj1JIM1YAskQM6tIIp95D9MTB6LrvDrGAjyet k6OdktGXy7CuHsmPmWt/LnLSNNV+sYz155NIX2Zcua01H8iQh9Kfz46TBCVP8M0KfcyQ NbGw1t2SdXb75imItv5n6jK8vxqOpmpjsqKIvwE8p1NQvS622DtoeFV/QJlXHpieQ0SL lf2NErf20yBaUOnwJaLnsrIX5YzUKHTewbBhIVOzeS7eGoKnI1H9kwc4/pMqkW4+DhbH lKwsHkRcOKYABBPRzWUwCP+aKqNNHazqPVbiDxIXeyfBkJl4ZB4todhL//fHMPFWZDo1 wh0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FsbkhM9i; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57320-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57320-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCV2hVC2CEPz8+a1U9+GokMyZvKyVl7l0P4tqgd6HFlEAzmBNa/GyHvySYWPYldRnFpmbPlxMR3FK2NJ6c6ahf4p3hkyOQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id cb4-20020a056a02070400b005dc10f2a143si3047277pgb.124.2024.02.07.16.16.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:16:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57320-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FsbkhM9i; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57320-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57320-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A3A47287CB2 for ; Thu, 8 Feb 2024 00:16:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAD522D79D; Thu, 8 Feb 2024 00:15:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FsbkhM9i" 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 D792214A86; Thu, 8 Feb 2024 00:15:07 +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=1707351308; cv=none; b=AMICjPNHdIAeBBXpNxma/dCZBWTbcEynf60h7RmcGFikGMoSHe8DVTA2yOSHx4jksrSfbzRmK+ACGKiwhmZaXYPbWQ2fd6OdmZBL/qpL6rbjY7NpDIrQCW398p74H3lqms6nm5SXKbOi4GbUzYZf3NgFua3OsSiRP2Uc9+rK5V0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351308; c=relaxed/simple; bh=sNJVGaszF4wsBn8pvY9hRM/14d9MfTxR5UedI/mXje0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WJKnBNCi45u4/ott0QKyo4J7kO3q26G0e+1nFhtDHX8dVYCVMPJ01nEoDm30TvWdlNpbnQhpFrp7Dn3AwBQEVPr2uCnsDsyNv4tqxUdyAqtVc4zz1x3TdcGKRCsmQo5RRcm7++kMNK0AwE4M+WNgoA07yK1vgfKjYfCy9wuM8EU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FsbkhM9i; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 187F8C433B2; Thu, 8 Feb 2024 00:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351307; bh=sNJVGaszF4wsBn8pvY9hRM/14d9MfTxR5UedI/mXje0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FsbkhM9i0zyiFRilq/ijYn96wApOfyna1m/Y5IHX9AlimAnuvUNTHbYqDCat8EhKH UHpfIz2j7d8EbWKMRUniH3XsR7GSwgsCOlMir+ycxL2ab1ybF6gNvZyBCJJ4wAkWqg evnJAdXxVcWWTWOQ7vMclOk4CIKXZ5DU5QwAurU+GHDTYoNw0n/fNDWaIiKCMxqQta 94ypXv8DxJlljnQWf6AJIwSA8DWcw/i3Pq6BJlNUNS9cSiAjSJ0aIqyZINYZhpSiF2 tYnqvllgafOvguci9epDQ6LVRU3w6chtoIxyxaOnzfXmCFIt+D4EyRjNq5xWt9FEhl Ea5Xe8zdUDX5w== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:14:55 -0700 Subject: [PATCH 03/11] s390: vmlinux.lds.S: Explicitly handle '.got' and '.plt' sections 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-3-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=3375; i=nathan@kernel.org; h=from:subject:message-id; bh=sNJVGaszF4wsBn8pvY9hRM/14d9MfTxR5UedI/mXje0=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZNlr3kel7O7/cdQpccMtK97/yvKeIpbJPwX3Od7Qd Gn//+dqRykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZjI4UuMDM3b41klGQrrE9bf 2PKix6aV6dtVaRMDvU1Si/tXGnl1CDD8s6mc+FTOSv4Ha2k6z4sLhS5B//nmxzhKOjx2fC81Pcy EAQA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287691124853183 X-GMAIL-MSGID: 1790287691124853183 When building with CONFIG_LD_ORPHAN_WARN after selecting CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there are a lot of warnings around the GOT and PLT sections: s390-linux-ld: warning: orphan section `.plt' from `arch/s390/kernel/head64.o' being placed in section `.plt' s390-linux-ld: warning: orphan section `.got' from `arch/s390/kernel/head64.o' being placed in section `.got' s390-linux-ld: warning: orphan section `.got.plt' from `arch/s390/kernel/head64.o' being placed in section `.got.plt' s390-linux-ld: warning: orphan section `.iplt' from `arch/s390/kernel/head64.o' being placed in section `.iplt' s390-linux-ld: warning: orphan section `.igot.plt' from `arch/s390/kernel/head64.o' being placed in section `.igot.plt' s390-linux-ld: warning: orphan section `.iplt' from `arch/s390/boot/head.o' being placed in section `.iplt' s390-linux-ld: warning: orphan section `.igot.plt' from `arch/s390/boot/head.o' being placed in section `.igot.plt' s390-linux-ld: warning: orphan section `.got' from `arch/s390/boot/head.o' being placed in section `.got' Currently, only the '.got' section is actually emitted in the final binary. In a manner similar to other architectures, put the '.got' section near the '.data' section and coalesce the PLT sections, checking that the final section is zero sized, which is a safe/tested approach versus full discard. Signed-off-by: Nathan Chancellor --- arch/s390/boot/vmlinux.lds.S | 19 +++++++++++++++++++ arch/s390/kernel/vmlinux.lds.S | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S index 389df0e0d9e5..4aa2f340c8d9 100644 --- a/arch/s390/boot/vmlinux.lds.S +++ b/arch/s390/boot/vmlinux.lds.S @@ -39,6 +39,9 @@ SECTIONS *(.rodata.*) _erodata = . ; } + .got : { + *(.got) + } NOTES .data : { _data = . ; @@ -118,6 +121,22 @@ SECTIONS } _end = .; + /* + * Sections that should stay zero sized, which is safer to + * explicitly check instead of blindly discarding. + */ + .got.plt : { + *(.got.plt) + } + ASSERT(SIZEOF(.got.plt) == 0, "Unexpected GOT/PLT entries detected!") + .plt : { + *(.plt) + *(.plt.*) + *(.iplt) + *(.igot .igot.plt) + } + ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!") + /* Sections to be discarded */ /DISCARD/ : { *(.eh_frame) diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index d231a3faf981..661a487a3048 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -62,6 +62,9 @@ SECTIONS .data.rel.ro : { *(.data.rel.ro .data.rel.ro.*) } + .got : { + *(.got) + } . = ALIGN(PAGE_SIZE); _sdata = .; /* Start of data section */ @@ -241,6 +244,22 @@ SECTIONS DWARF_DEBUG ELF_DETAILS + /* + * Sections that should stay zero sized, which is safer to + * explicitly check instead of blindly discarding. + */ + .got.plt : { + *(.got.plt) + } + ASSERT(SIZEOF(.got.plt) == 0, "Unexpected GOT/PLT entries detected!") + .plt : { + *(.plt) + *(.plt.*) + *(.iplt) + *(.igot .igot.plt) + } + ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!") + /* Sections to be discarded */ DISCARDS /DISCARD/ : { From patchwork Thu Feb 8 00:14:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198137 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2587414dyb; Wed, 7 Feb 2024 16:16:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlw/Op4XswMU9kufHaxsgPDa4oz10Qucic6vFnNkfqnyrvsOzEfRVyNRX0uBPNs7oe57Ew X-Received: by 2002:a17:907:174f:b0:a38:89a9:4206 with SMTP id lf15-20020a170907174f00b00a3889a94206mr2169139ejc.75.1707351413000; Wed, 07 Feb 2024 16:16:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351412; cv=pass; d=google.com; s=arc-20160816; b=jAWf+5fpRkp+ECufI3txLq+b6ffyyOp8OC3E8zmd6dm5BMpBxVvZ9gw0tNShygZ86b 8cxfzqcnNAAR9SQfQraB/8G3SySgkX6J3MvrdIRyPlXrx35iINLJtjx+6nTHO3kn6DoD gsuLNNqDj1XH/sPJ2+AhPS7bkvGsexWWcsW4S4X9/IfJqq8sMnlYEp5Ho6lq65wEhCAa tT6fYIDQeYtRI3RrrdamYR2I8aPsTf9y1ETY+8UP4O9D+E82mlDno4zuj08PfTSnNoU8 MPHo06/ijdsNF5ZbcpqZdvn9wnT5lzy1NhlZ7HpWRaeayvFbk3LvpWCoXhIfPPK9bD6q YY0Q== 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=UAxhJ3+3iOdviAfn+0SxufBH0gM1P65AycyTaO08xt8=; fh=3LhxCWwa29jz6mg5nBM/B1HGXWU/arh4ZExet1TahNU=; b=LwXtQWWYxFjXYjSNWqugH552uNViF1g6Wq4OkkXRwRzClbsChRNHrTfL9kYy6ap9oy G5/d4xLqZgtsJIn9Q37oDwdP1d4S8o3wgMzR+fP9KLxnbmQ65Lk/QQVQrFhUF3dXdg7C UxDNcOeatb92qNGFz0qy81SHUvonwvFvoxOBHDMLsz35njs8jhP0BJmnxNq1+ztVRn05 sWmJpoldge8zlAivLIrr8g5rR5YjQnCsA3KLpNNiXns+RObOY61e1wvuif1uHHuUxHW0 J0IXwrvT+dsKGYsBAlPFlWDZOc0MtOb6wIKDMJhZOxqx2BmReSC86pjMiCc34qnNVEcn Ertw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fOJBJaUB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57321-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57321-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWhKGzA69Ej+qNj+SmP0H/hbWwES3cg1UMaNz91EWirG/jv40z6lg+7QZhVvbyPpLCWDid8HAl4f9mjC4QNoFRpOMZwIQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n14-20020a170906118e00b00a385556f8d5si1463333eja.405.2024.02.07.16.16.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:16:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57321-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fOJBJaUB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57321-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57321-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 911181F22062 for ; Thu, 8 Feb 2024 00:16:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E17ACC8C7; Thu, 8 Feb 2024 00:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fOJBJaUB" 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 0BA201E4A7; Thu, 8 Feb 2024 00:15:08 +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=1707351309; cv=none; b=AARwuX+rI9zyO/T0g6eWf6rZcowQYfTbXz/Khr6BIpus6UNvnogHowqRr4lmMOK+Y6nEFQ2AZpUiA08CHzBtCKd5Ha6ZOr2xoYaCUxy1jHA2HtyucKfLX3o+DmIe7GK9rBsvhm/V2Pye8smgvwBxEqI0fyoQFBtOHwBxc3pDxEE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351309; c=relaxed/simple; bh=0Khy05nhsc8IVw6OcGxTD0wL0pcsnDmwXjS5CQyzon0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EL2W0NMKyKZswuvrnTrNGzhlI6v0ZAP9tkhttgLoXmBYJHEelbq1+D0VwZCnZJkiYbRef9LTbDryekjMaXeDrcEBeVckYcPsw5G2sC9xF+sLhqdVqhg+kGtddAHI5xjYBcJmfPydsir/uCtl/YBFiLwwp4JBLxRAJ32Yaum+pWo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fOJBJaUB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9523C43143; Thu, 8 Feb 2024 00:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351308; bh=0Khy05nhsc8IVw6OcGxTD0wL0pcsnDmwXjS5CQyzon0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fOJBJaUBcLAQwoILyMM5cB1A99wqwoQealbZLTQEtUvDIRDszPPWHDIE6fu1D9h+z c0N5ravztR0NdvZihHAIdpDL0QcCW6egIZXuGd575StCX0b+I2eFTyID9sUV6H4OcB gg3kbKBt6E9+e+petluXLdTBWi8MijbmYrM2MnlYAq6nCjahioTxHhcfx5/FdhfLDi YgRYxgENlmbbIti1mD47gj4b4AFVe/qNIGDKjR9/o91fuJA63VXbGXuc6OuIvqRXTP 4oLkVl1V3ouvcuzY21Kdxcn6RKJbcAYrNJZQsj3bxYshfrVXWn4QTAbw40t5MjP0jB UadiusbGZ5mjw== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:14:56 -0700 Subject: [PATCH 04/11] s390: vmlinux.lds.S: Discard unnecessary sections 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-4-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=1280; i=nathan@kernel.org; h=from:subject:message-id; bh=0Khy05nhsc8IVw6OcGxTD0wL0pcsnDmwXjS5CQyzon0=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZNmnGd0+tUxwadNrSd+EJ9rR1cWdk5OuvQn+33C0k u98oVx9RykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZjI0puMDCt/M736/lcgXEN4 p/7aoBDnH4fjN97dfGvTWyEfocn1kZcY/odp2O/tfaOWWy8i8m26zZdd7smrLEQnce4qmCl1W/b tGz4A X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287715312305533 X-GMAIL-MSGID: 1790287715312305533 When building with CONFIG_LD_ORPHAN_WARN after selecting CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there are some warnings around certain ELF sections that are unnecessary for the kernel's purposes. s390-linux-ld: warning: orphan section `.dynstr' from `arch/s390/kernel/head64.o' being placed in section `.dynstr' s390-linux-ld: warning: orphan section `.dynamic' from `arch/s390/kernel/head64.o' being placed in section `.dynamic' s390-linux-ld: warning: orphan section `.hash' from `arch/s390/kernel/head64.o' being placed in section `.hash' s390-linux-ld: warning: orphan section `.gnu.hash' from `arch/s390/kernel/head64.o' being placed in section `.gnu.hash' Add them to the discards to clear up the warnings, which matches other architectures. Signed-off-by: Nathan Chancellor Signed-off-by: Nathan Chancellor Signed-off-by: Heiko Carstens --- arch/s390/kernel/vmlinux.lds.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index 661a487a3048..35a6b3e6cc50 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -264,6 +264,7 @@ SECTIONS DISCARDS /DISCARD/ : { *(.eh_frame) - *(.interp) + *(.interp .dynamic) + *(.dynstr .hash .gnu.hash) } } From patchwork Thu Feb 8 00:14:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198138 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2587519dyb; Wed, 7 Feb 2024 16:17:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9atotpArCmaz2ufKR7mb7QhBgBs2Melmo/mfEUEE1EKZfo9Rbl4oRbBWg3EoRGfOps1cO X-Received: by 2002:ac8:7342:0:b0:42c:c5d:430c with SMTP id q2-20020ac87342000000b0042c0c5d430cmr7261419qtp.18.1707351429366; Wed, 07 Feb 2024 16:17:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351429; cv=pass; d=google.com; s=arc-20160816; b=Xuei7LFmwJ6FJvBUUznWhh7MpK3oGh42yoGbdoLWyMLmVzwtk4NNsJkbGZoW5LxC4P lolZq1+hKAbLVy0L03W9ICsJkSpO1YPnwmGuk+AoAwuXg/ovnOotw+6KJp69QUppQsTG DWmbLlaf9OqnLOymWIGlF9r2F7pgA9iUiXNpTPxyOQjT+Lri99z2TW37Wrzlpcd4kPH8 PxwaB/h1f352pNdv8qWoqArlUAZWqjKt+fHI2AS77eLL8xcTmaxP2oBlSITcBUd46x3k VtEuWCn0M0GWrXVXNZQctFw76po12gYydXVWa6vlVu3UMiJTxJ1RRBkCdm0ZRkqvhgDI rAMA== 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=En82SMD6NHc7Lj4uwzGBSYZ7Rfv3cE0r2TtnDl5mf/s=; fh=yIGZKspw8AMPt1BaWxQ1XOXh2HCZq/9rqO/5yJ27IDI=; b=SlXTa25mImrJE0IeWfXBuCQv4jfQa0m9wkyfx9TN27AUWHdIiq0aZcD+h/yvWxtrmy 2l3hwpUpw+MVluvhfIljPppoi2S1DKcGfKKEVvqxeKvSd1Mhp5tqmpOquByqnMQ5i5LG sHEp4ZMOK9qpEeP47qhG+WNoP/VjVq56PF8kneXzx8g2q46cMIYTVeUxKs+sYuY/6dQJ 5xZb/ycnup03HvGgZJqOm3FQq1P25TvqvGufJgL+ZEKQkk2trWGfUp6/xEMc8E6xs5HH C3A7c8/eAiCv3X+NxW8f6dIModoTL2NYuuANOVi2r4MhlzYY+LL9fM9mmroji7CJdUEZ ORrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Yx0QPSPy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57322-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57322-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCV9bMVwBWie9VKP2wlDm6Q9oEJd4yqbTpsw3J57FfcmA5EQqGy9f0bQYEIkKP6rnmn9xhjG4YAf38AfMFFDXU7tbSzHEw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v19-20020a05622a145300b0042c364d3b31si2217645qtx.96.2024.02.07.16.17.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:17:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57322-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Yx0QPSPy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57322-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57322-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E2CDA1C2274F for ; Thu, 8 Feb 2024 00:17:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8FE5364A5; Thu, 8 Feb 2024 00:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Yx0QPSPy" 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 D69E823769; Thu, 8 Feb 2024 00:15:09 +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=1707351310; cv=none; b=Jl8NbSsLzlNsB48sgKsCg5dPKCSPs3eZulux9RTW5tF5AJ4wKL170jb2p5uuC80gD67thUpI4rZpAT4Y4/Vqmf6Xf0DemKpdBvY7Vl1Y20rJpT/gUxdSDdekjhQVuDRl+trqMED/WXkCsWKGI1t5hXbr1MyriDZA+vMvzFY26qI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351310; c=relaxed/simple; bh=gbC1anMbNm1FG+NXPrt8YyWEwy6EM4CjZshV2LCDdrc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s+kFSgRAsDdgGszKOVLT82n20tGkbyXtCJsA7P3xrKh1S2BhAbG9Sh5kVpZMAfaar8ltKBvjBaZFC5q5B4+brWf1qXCfBf9crxGFPGksWOUdaBhFJ7XZmy/UsTVjUa3UOSwteQqv4+4gHtB4XUdVKRnpX6iRdhm628a7T4r401Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Yx0QPSPy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A333DC433C7; Thu, 8 Feb 2024 00:15:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351309; bh=gbC1anMbNm1FG+NXPrt8YyWEwy6EM4CjZshV2LCDdrc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Yx0QPSPygQaFPOX7tvO4hR7s0+YKqwXoGcWLfzg18LmIjcVLenaJw5PmWLJ+2uF4i LNru6iJPuzgGVxbIDDRY1W6RzV4SzmO4tuBk1qhJ+03NIP66w4pQo5JptJ6DAcUxyR P0KYjI4rdj8Qat9jNLs8KU0aYJr59acs4/tOTtJgaMhQTIln3pwRyUXR7jWpbXUJab skwm9j5XZnAxMdfdxyL52Fg0w7cAiSTokk4ZoBc/plDBTp6h24e/wr3V3nbGhf5Yb2 tdBz80eezMkzM0z1kZ1tKWP9WmmQJEOHZ31Gio98ggS7uLJo6xOkW4yjK86sHEdLV6 d8TgKxL64JhYw== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:14:57 -0700 Subject: [PATCH 05/11] s390/boot: vmlinux.lds.S: Handle '.init.text' 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-5-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=983; i=nathan@kernel.org; h=from:subject:message-id; bh=gbC1anMbNm1FG+NXPrt8YyWEwy6EM4CjZshV2LCDdrc=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZNmr4358lJ0kPvHbxIPyJQahjrHTauQPdr++fHByx ltjpV9uHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAi6+IZGZ62LXwzj01OKzV1 eZxOTXP+ReerW16+4Mgw/S+wrX3C6TSG/w7bVY6Zl83qSbnzOjb42R3L78I3fZl+xN2XvrBJZNL aEEYA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287732472827322 X-GMAIL-MSGID: 1790287732472827322 When building with CONFIG_LD_ORPHAN_WARN after selecting CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there is a warning about the presence of an '.init.text' section in arch/s390/boot: s390-linux-ld: warning: orphan section `.init.text' from `arch/s390/boot/sclp_early_core.o' being placed in section `.init.text' arch/s390/boot/sclp_early_core.c includes a file from the main kernel build, which picks up a usage of '__init' somewhere. For the decompressed image, this section can just be coalesced into '.text'. Signed-off-by: Nathan Chancellor --- arch/s390/boot/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S index 4aa2f340c8d9..2f0bc05664ed 100644 --- a/arch/s390/boot/vmlinux.lds.S +++ b/arch/s390/boot/vmlinux.lds.S @@ -31,6 +31,7 @@ SECTIONS _text = .; /* Text */ *(.text) *(.text.*) + INIT_TEXT _etext = . ; } .rodata : { From patchwork Thu Feb 8 00:14:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198139 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2587631dyb; Wed, 7 Feb 2024 16:17:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBAIscYHpENj3Um0Q2H3GgVlmpiZDZkplLCw8ZRdX7jc90t7qWek6+7c1eMnQqDq3BR5l8 X-Received: by 2002:a05:6214:5011:b0:68c:74a7:9e21 with SMTP id jo17-20020a056214501100b0068c74a79e21mr10912776qvb.3.1707351443597; Wed, 07 Feb 2024 16:17:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351443; cv=pass; d=google.com; s=arc-20160816; b=WPOTTNK6rQ+FGK0bKkdx2AFzmX4EdrQKGldwY7saEtBw/66eLB3q9axnIGCorA0/IS snmFWwRdgcdojRWyJ0wc/ExffMzwDZactYkbs+LyCs8yoIqfEI24RMydLs29WqtHWmdI 7pyhddSPRn3amKQ6FuXTotcft43IV4K84THg8bUwLUrHzxaGNv8Wvb3wfaxx3aKZGrIt YrN0h8wBuhyZfJd7eDe727/vWIZLgflBgpZTFfrmLK5TLDJW7jAHAQS8FN7mmSbz5/fF N7uK1GoxH49SoJpbLDZzV9juExS4M6H3FKjv63vykNmZYVA9Z11LW75G8V12HYCM62zn CabQ== 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=xS/A68PfJ9KFLhtBPaxSKkUvm8RceqsJwPkM+Q8vvh4=; fh=aG5YmHuiqtvoO+jsQy3CCiNiWkE64AmKe0T7qqnlUQc=; b=zLsbulsEd66x0iccSXwVYpfBHebMRbXEQPXTh0fVRbuyQ1VGcIrpuF7CsQ1ELDXXqG HCrRI3jAXDjK/H+xkx3mcsuGXS8DPYhyaIE5RXHAXsLMn8xAETEOwzE7aG6xEdSKCDH5 hUhVoABbAwECdGPz9PWCTufdDPx9HfMhDuWy7ankHZWXj4sJ1wgbMYXwWFyTrSCrWOpJ PLcJydL8ESL3vLXyM5AWEInueoLzd/0UVdkp1rgBScBR7XA8T8kOnjAIkx9VaN3lt8sw bJZDZQXr3Q/UB58gkGng6Xf7nBaA1SEF4kc9z28yXHQhUcrV+1OuBFav9L9pF/rkWar+ An4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pQcPoXsg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57323-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57323-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXJHjXZLYg7e/SHDMJYK09mxjKShISWFAQI/jixvH8XKmobweKeMlMBXRRGG6g5LdnyImOKl8SW4icPlXMEv9rkAqKs6A== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iu15-20020ad45ccf000000b0068cbbbaa936si2464509qvb.297.2024.02.07.16.17.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:17:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57323-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pQcPoXsg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57323-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57323-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 619081C22BE7 for ; Thu, 8 Feb 2024 00:17:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 665DE364CF; Thu, 8 Feb 2024 00:15:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pQcPoXsg" 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 6E8DC29CFB; Thu, 8 Feb 2024 00:15:10 +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=1707351310; cv=none; b=uQHK1xH+CvO7j/CEhxqoZrmr8mjzUmS7wk7863apdxYKRaInpTmB+Hsxclk54dksKaxq8n0QmRbGfGovYOQm1hYCJdRCcfahnTkBLaA1j3To5ToUGsaF7oYFQrA2hFYI2t3zPneC3lhGbk4y/2FX1RkXdG7xeFLLaDXqzj8A9Rk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351310; c=relaxed/simple; bh=KRQSj+pCd28VbnV16E5i5W+KSoyksfan092qVAxtBJs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L04h1H+iZXYbWqf+e3wIOl62WjQU+8trubWh9lXyQQqPblTARuCQyutCI3Tms1b8K5aedk0pEGrKgjmb7AfxMcL1Z50OMXGbIe5N5motdwZvknJTQSnvmpk7oURWA0z5dtvBCcUKNqHxw6MDtMouuYhVfkWKRUfuKNJ1H10zgAU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pQcPoXsg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BA59C433B1; Thu, 8 Feb 2024 00:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351310; bh=KRQSj+pCd28VbnV16E5i5W+KSoyksfan092qVAxtBJs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pQcPoXsgBOiC3EZXF7EKZeBNRfnk5uYo2Op//tZzA/PAck1qoq5FAzzBkbQI6oW8/ qPU1uQkewIHyVSpCHq1i53jzBptofiKJo/ggIWiaPWwYHkvqZbphDvBPQjFyhxnZ5U URqNdlV1Qmz8T87Oqe6IKhXGChCNYZ5cd3eCgRIe9Org6GQcdMhdVxDAhCtrpiSQPI HluD+MbAeIBtG+3tY6+nEuWpDL1RRbfQr6yNT2YsvIRtIAknKFnZ7aYhR5yWqUmNOn aQjpO8XSm/UQjKqSqn/OAs4ev+mTjoF3uo6k13+xaJ1ps7G3GdDj+UWY44Sv92O9xy X6CCzQ0R7aN8w== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:14:58 -0700 Subject: [PATCH 06/11] s390/boot: vmlinux.lds.S: Handle '.rela' sections 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-6-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=2359; i=nathan@kernel.org; h=from:subject:message-id; bh=KRQSj+pCd28VbnV16E5i5W+KSoyksfan092qVAxtBJs=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZNnLdM2i2RqEDtvvUo6Zrzm7s0liSoR8XciqxwUGs dsOnnjcUcrCIMbFICumyFL9WPW4oeGcs4w3Tk2CmcPKBDKEgYtTACayyoThv3/f89x/z8UDPj/Y 1c3qvnz//gnrrnzYLyn/9P3NiU8Ko14zMryTlw7PXbGlbknvRemJcxfwHZg861O15oPDLfvXaii tYWUCAA== X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287747610663444 X-GMAIL-MSGID: 1790287747610663444 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: Nathan Chancellor --- arch/s390/boot/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S index 2f0bc05664ed..ff8c62d84f98 100644 --- a/arch/s390/boot/vmlinux.lds.S +++ b/arch/s390/boot/vmlinux.lds.S @@ -137,6 +137,10 @@ SECTIONS *(.igot .igot.plt) } ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!") + .rela.dyn : { + *(.rela.*) *(.rela_*) + } + ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!") /* Sections to be discarded */ /DISCARD/ : { From patchwork Thu Feb 8 00:14:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198141 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2588399dyb; Wed, 7 Feb 2024 16:19:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHauwJsIjFz1XssGpUVTS3YJBSDzSkcXCqUt3qp0tKBa2A22CssxbYVYmgPxZkbhk25+n+w X-Received: by 2002:a05:6870:80d3:b0:219:7d19:8a05 with SMTP id r19-20020a05687080d300b002197d198a05mr8228076oab.33.1707351544392; Wed, 07 Feb 2024 16:19:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351544; cv=pass; d=google.com; s=arc-20160816; b=magQ8r7FxBcQWtZNRg7jJjn9UMajdkKAAjrYtg9NBqUTP+Y56jzQ2R2j8Mv0uevKIa aP7X55U35CaaZzV4VBgtuTV3/wB85NOqiyQjv7m/cjmliMQmCwKbeHcIoornm62r8xCF OYgeQUagjjMbGokDzV0hLzz2LrVVpttM/rGrynYox586SiSKUbVFudOPS1+vMmJei5fX jjqmB5QRbMgAWmIu9SdqQeRpRbIKDKbRLMKkxa/S/2JuZYadOyZlq2/yUY1B4b+fE0rR +7V0BBqgOAInbNPm+l43OrCd95i2+DwoeIvKISz3CJlzKAHRFmLtQJIgkg/ffmeextGX ilIA== 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=WmBBWIIpgusb9gfESvHYf0QcDk1bBIFkL+77B1aV46o=; fh=lnnzvl9tUXVBCcKihJZgMblW/7dXm4TRCGTC9/nzcEQ=; b=uOSCUKh8w+59JOXjX3F1xkkKC2FhcyISSVJZvEIBfdMGT1NwatR0FVScjpznUiNclE tLxbZtXT9qGYSVU3mTX7ooYSsHW6e9TWTRA8i84+ysiGjN3c+Z4roDqxl5N17ntXkq9S tO4uSAxdnkl5t0TAgN6G+yurDERB2vqMo7TaQTIc6iQUa5zOHKk0Nzd0FC4trN8ed7EH IE2anXEZuVgP5KWRS3itMYQNIgizTTOMkQdqhGJopNhbNGaw06KR70jygIZsLemjyGi7 ERYvHTwPE8TTPoApqwPL0iLGAseGo8FOpo0tqRKeok1jUEAVDm71UEiyZriAmmBs2d8x +7sA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T0j6x3wg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57324-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57324-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWW+k2V5j9cm6ZFsGC+xbsiPLZolDxrUFtHwXBBZOt1yrC1USf5dsb/+QSJbPo5zCwujWH5xqE3EEe61GPAQG6QUCnFOw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y65-20020a636444000000b005cdfa6ec001si2695756pgb.380.2024.02.07.16.19.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:19:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57324-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=T0j6x3wg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57324-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57324-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 4719BB23B23 for ; Thu, 8 Feb 2024 00:17:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03E4736AF5; Thu, 8 Feb 2024 00:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="T0j6x3wg" 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 22D3F2EB1A; Thu, 8 Feb 2024 00:15:11 +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=1707351311; cv=none; b=t+mEIzB51CDH75GHh5CKpqmB+uoa9rGPqC+mxKLXC9LhhAqB3bK6VOiO1GgxeZvxCCmC5Gf/9VYxqfKEYPKZCT2ywtOTarLqV75W2sfL0FBQ4eTESFcfEfGaTVWNpt3YsmiJ5tvIDOzs8w4nC2gYnRXBh893WyXFxPqs2U9eKn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351311; c=relaxed/simple; bh=KHxjzg2nVnCz7Xo3WUiDpqO3qL7wZjCy4cl0c4riXaY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZI1Iir9c7Vwd4EcGWDZkyZhitNfiGTJFKlSFe2k0Rgcmj4f7RSOdXvNvhqK/KbkgyF6OEjuOohHaRsrV9Ijpxr3nhbAN6urLcg+i1xK2npn1eXW/hJqXWy4BTm3eZtnEIcD3e2DbDclbrzbDslljVz/Adx6koTOeKJh4H3Om+J0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=T0j6x3wg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A9E1C433F1; Thu, 8 Feb 2024 00:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351311; bh=KHxjzg2nVnCz7Xo3WUiDpqO3qL7wZjCy4cl0c4riXaY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=T0j6x3wgeIAg+/sh2h0RKM4Eb75pwg5NNVAxncktwO4c8LZqCo9lHNA5Mxrg0hTtk A6gqYouoa3iGNuKrj9Q4M6Y6cPfb4VvZ2fcqaMnaKULBon54kQgDlXburcQHSX93vB vPmBdFys+MBUOH91KeTR6zXvW8Al5NTth/rRwVDjuuFRSYpUT4r1XxoAkWVR1XmYHH xVlXZAoZcU1v2rvn+g7HU0j9CXq7Cp5naBsa52Kz8rq0ViFvQ8KULzEU8A3BOglyzr 1qyp9J85Wr0HEKGFpW2L43w9nm/W6RUry6cK/OkfC/nPWequsNvL/6BuFKW+VucOxz 1PRXZZmXX8eQw== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:14:59 -0700 Subject: [PATCH 07/11] s390/boot: vmlinux.lds.S: Handle DWARF debug sections 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-7-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=1511; i=nathan@kernel.org; h=from:subject:message-id; bh=KHxjzg2nVnCz7Xo3WUiDpqO3qL7wZjCy4cl0c4riXaY=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZDlav+Rd4Nvj9u6e96vjoowWO/O+Hzha1M7MIPl3G 4Ph9WPOHaUsDGJcDLJiiizVj1WPGxrOOct449QkmDmsTCBDGLg4BWAi/WcY/kpEP1aSPDft2HyR nkMfTNZLGr6fdJcxJ+HwqRmGhvvO8r1gZNjJvSnXsELt+26e9M3q51kXBNUXtmhvPTjTeasd82w nGRYA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287853111166508 X-GMAIL-MSGID: 1790287853111166508 When building with CONFIG_LD_ORPHAN_WARN after selecting CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there are several series of warnings for each file in arch/s390/boot due to the boot linker script not handling the DWARF debug sections: s390-linux-ld: warning: orphan section `.debug_line' from `arch/s390/boot/head.o' being placed in section `.debug_line' s390-linux-ld: warning: orphan section `.debug_info' from `arch/s390/boot/head.o' being placed in section `.debug_info' s390-linux-ld: warning: orphan section `.debug_abbrev' from `arch/s390/boot/head.o' being placed in section `.debug_abbrev' s390-linux-ld: warning: orphan section `.debug_aranges' from `arch/s390/boot/head.o' being placed in section `.debug_aranges' s390-linux-ld: warning: orphan section `.debug_str' from `arch/s390/boot/head.o' being placed in section `.debug_str' include/asm-generic/vmlinux.lds.h has a macro for DWARF debug sections named DWARF_DEBUG, use it to clear up the warnings. Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song --- arch/s390/boot/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S index ff8c62d84f98..83af17bfe630 100644 --- a/arch/s390/boot/vmlinux.lds.S +++ b/arch/s390/boot/vmlinux.lds.S @@ -122,6 +122,8 @@ SECTIONS } _end = .; + DWARF_DEBUG + /* * Sections that should stay zero sized, which is safer to * explicitly check instead of blindly discarding. From patchwork Thu Feb 8 00:15:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2588579dyb; Wed, 7 Feb 2024 16:19:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFp1x++fgiVrqrJP+iY19p2BlLnprqhxbxS9/kbC9sBLdYCeULbf0BWsG2loLEvdEwnD20q X-Received: by 2002:a05:6359:459f:b0:175:d6b7:b5a9 with SMTP id no31-20020a056359459f00b00175d6b7b5a9mr4632885rwb.23.1707351568954; Wed, 07 Feb 2024 16:19:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351568; cv=pass; d=google.com; s=arc-20160816; b=d+Sx4oQ1TnZuftgThHLfENSOKH/1oHjLqTe8KB+PRVfu5zMUazf0WW+MsZnQuqt1Sw 1fwXOubp8SpOAjSYGYXf1c5CltPLALEx8AFjn16GdjXtRWIZBWE2bznHbpv2Ufi8Z8K7 hVykBAxYOIbaXcV9/u3ryO+mLjFWvZN5uDuA/3f77Ga2K/DTfm83S6GAyJMc7iUl1be2 c3SKYEpcWRJbOyD1WSiB9XRuePD9ejVC79W1LX0XDeihMvTrGNFZr6/LTHHItQ9hSeS/ R6QmvE2zNuJK2fYi1vIe6yXAXsxvTd+PIRdlvjkfikQxDVmjg7jXd+7uzcs+4SvYQyvX zh5A== 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=g9J2Ps2lao6vGT/6f8MK6XL4Wle328iN0KQ+Iaj9/dE=; fh=x2xz8fqK3JrxS0edWo2OgBzTDhYQszWx2xx2VLc62Dw=; b=M6ivWEdfSQvBn13T6rwLt7RmarDXX7q+0ymuH3wnQNtD6yydiSf67Oih1+d8L3B1EM IOdZ1Y4Nar+i2YMRgK+yvT9cBWPNRq1mI5JYjRhflPxJZiassJlVs+pGMQDE3QPwbbNc IRzbzoYj6O3pzIaOnCgEEnIThSCsUMMTbbi4REtZLRffoiLVKfAtv0Bx+KuisMLioVz4 7BwAOfFnOlXgqNnt3n567zitjAZQg97RVRynghp79MRqQr1XufiFsQeCi2Bzul0tEocr zAHSUy0sULpbb8L9WFm8HLiaAFOVsduynG1pSsXt9uqOgoGMHBjKAYJraRvwdmpkRF8L PHEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9sVfPBs; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57325-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57325-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCVneSqc0Npu+BLm3STj4kzzeaxNYDC7zRZYaAdYP6JnlbrDQKekw5BXjiCuugL3/nK2rTEsnVQhqbusaF6yNp2NXiW5dQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y65-20020a636444000000b005cdfa6ec001si2695756pgb.380.2024.02.07.16.19.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57325-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=C9sVfPBs; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57325-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57325-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 28CEBB23BAE for ; Thu, 8 Feb 2024 00:17:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0B75364AA; Thu, 8 Feb 2024 00:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C9sVfPBs" 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 EF81636102; Thu, 8 Feb 2024 00:15:11 +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=1707351312; cv=none; b=Qvz8t7EtJCE93gEQKT1WgWH8UidqvDAhgbpricQFyq1/GCbe850NVH4zmgymfCUN5VljUPvLKL4m3tWsdSnXrKtkMvAhwiDmY1MhcB+VRTSui0uvu40/PJ6Jub9YipB7jzS+7FGtKrXUgtZg2ND1FQ5dY8h9bYJXGuM2zzNYHC8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351312; c=relaxed/simple; bh=gv2syl8soBeiqh7QJH+tsCZ+2ZB+BManKyNhoDBSrmQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ITEKk77LToqWkJz+q8YW5XMrkODDrFtHAEPRPNhCZgGUOng1eIiiX+rdfQhhOTZWVhkaimz0fzk7EuuA+oe4a8BDYp+IvCxCvuysUV50sxjN1Kly+nmABblE/7W0Y2DrmwNkgT6+dGuRUoH7NN95A6mCSqoAG4rju0MZxMw8x3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C9sVfPBs; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A3D7C433C7; Thu, 8 Feb 2024 00:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351311; bh=gv2syl8soBeiqh7QJH+tsCZ+2ZB+BManKyNhoDBSrmQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=C9sVfPBsK3DQBpnrNPYihu45yaQ81e7XZRipzRtD7VWptiVbTgYsSZYOn8fSSFpYK XOUPKsEzfCNErrVYHBrIst/SYtSOTM/fv1baIOcbcFqhYHqt89CoJpvzH1ZufEQz8P W0r2zqTCNKUVMmMYmJkDLvLwimY2uDWtWPCnNRj7b51/01b6rAfby4mJD4s9Zazvuc vKuMypNK+BTifT3EstIIm9T6D11G37CmCwTwj9KFKE6Daanf+S33YSderN4HUy3is5 YECM2wca5BYpWJuEL7DvQ2Gip/Zu3E9yo7l9pW0/qRkSVeT5haqxbh5exSyoC6D/3x P+LxX6xXZ7Fig== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:15:00 -0700 Subject: [PATCH 08/11] s390/boot: vmlinux.lds.S: Handle ELF required sections 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-8-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=1172; i=nathan@kernel.org; h=from:subject:message-id; bh=gv2syl8soBeiqh7QJH+tsCZ+2ZB+BManKyNhoDBSrmQ=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZDnmX6rx77twx2bHR/euFdJz7dvvG57MUb93/Hv5J LVnwjw/O0pZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBETrYx/M8V+JHtUdp8esey wv8vUxTvM/5peZxfo9O07pySkrKwx09Ghv/qN15oah/qPR7SybG8hyf9wI55vo5Wew7dX3N1Zee XX2wA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287878918167306 X-GMAIL-MSGID: 1790287878918167306 When building with CONFIG_LD_ORPHAN_WARN after selecting CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there is a warning around the '.comment' section for each file in arch/s390/boot s390-linux-ld: warning: orphan section `.comment' from `arch/s390/boot/als.o' being placed in section `.comment' s390-linux-ld: warning: orphan section `.comment' from `arch/s390/boot/startup.o' being placed in section `.comment' s390-linux-ld: warning: orphan section `.comment' from `arch/s390/boot/physmem_info.o' being placed in section `.comment' include/asm-generic/vmlinux.lds.h has a macro for required ELF sections not related to debugging named ELF_DETAILS, use it to clear up the warnings. Signed-off-by: Nathan Chancellor --- arch/s390/boot/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S index 83af17bfe630..2bef450e84e9 100644 --- a/arch/s390/boot/vmlinux.lds.S +++ b/arch/s390/boot/vmlinux.lds.S @@ -123,6 +123,7 @@ SECTIONS _end = .; DWARF_DEBUG + ELF_DETAILS /* * Sections that should stay zero sized, which is safer to From patchwork Thu Feb 8 00:15:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198140 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2587989dyb; Wed, 7 Feb 2024 16:18:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0MxHFIS8zkpkcD59qQ7huUCz5794WYBVOIiYmi89azS9TQo0/fqB5vQaWcpMLL63D5CxuKmk9c5UpSC7+WlFo8TcT3w== X-Google-Smtp-Source: AGHT+IFVzuC64+FC6k9f72xlePf/I3YGb1PX+khMvzAirtQekOFDHl85RbUiHfHt3M3K2QZ+duTp X-Received: by 2002:a05:6122:a02:b0:4c0:2416:6fba with SMTP id 2-20020a0561220a0200b004c024166fbamr5219205vkn.7.1707351491659; Wed, 07 Feb 2024 16:18:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351491; cv=pass; d=google.com; s=arc-20160816; b=OJ2GxcN/v7phhegydGPoHsKELQaXlDp8VLPNYiNXMjUIltjhVGUPCOk6466R4AAqZi mjhJAEgACxYscOcVMhvmF54K4pF2E7FkHA3oFLUo2Oi8O+6e53mGH3zvelYSTjH6K/OH uRAnqemSs47Vj1wM7fI5qOiwYdxm8d7OxOpe73cG4SruxkeO4LdlJLAil9y+PCPkasrL 1XwWQrYL2lSZR3f9o0t6XaN6AMUvhNV1Vto4KQRXdSduEWxC95i03ASzBnXh2x5kNMwD 0wpeAh9S1BIFbL0oIQ5Mvr4rF0SDWSG+naSSW/CgUSm2CeF30hGV/dk88faAQudWyt+0 fz/w== 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=l8BVgx514sziwvXpB+cPsUShLNl5eOL1WztGeYT6YXo=; fh=IL/5odT3pOu++pxwFo39cHhfvl+e2zhYpcqAKN1I/tQ=; b=vgigZ+zX+1Ucef+wHK9NWtlxJjXxLHvjxbAH0MKUZlUrK1ruoUpM6q7dO+I5vmOrPT ea0UBbdlU14kv+qKj9JdY0eGMcYwG7YpfChQ6HWfCisg8h7HrnykcGBokGzVsoL/cPW/ ZYNHlK4WgZpc6prSrAK0FGFcBDKMJoTlDlZB+qduytDZVDh4BMn01CEUuiyMlT9OKdrE 6unI8bBql8PsW7Byp6xT4Z/8wA41ixh13PFZbbhKLPnlP2U481VdESjSKDKtsc3+oygI 58Jek8FTGn6K/K74FrY2z+PRfIVgHA/CBcH/d9UHtiqaprIRD2m8xRmWciAZL/8oTp2E Egmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a+VBM/RR"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57326-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57326-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUjiGxR5Dec4E7UP6ZP2MY8CTW2N17/uRUsI6Ojh1qhIf0l3uTFbM1urdz73qKNga+rQWifcYViOiKdxIY/wVu4qG/XdQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iu15-20020ad45ccf000000b0068cbbbaa936si2464509qvb.297.2024.02.07.16.18.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:18:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57326-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a+VBM/RR"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57326-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57326-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 71C321C22BB1 for ; Thu, 8 Feb 2024 00:18:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E555C374DD; Thu, 8 Feb 2024 00:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a+VBM/RR" 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 1772C364BE; Thu, 8 Feb 2024 00:15:12 +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=1707351313; cv=none; b=lMFAbasPI3iH/uX7fW2ppsqnCFeAm10mMLzn0xtB/a8F8HjhFLH9UrmW1CLlX8B7XxaYEgdKTt6QO8igV9DTuqwmRaanaebK/RqK8snkJFC8EZyeAVs86F2D82n6NdU4RblticpwGrjq2SVRjH3DkvOntRpJF2CMsbM0OvH5FZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351313; c=relaxed/simple; bh=oj028p9Bfp82VhGdol8YywhGeGdWcYwVFqAjOaIyq2A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mx7wc8BP3RYChnFdrIEiew2ubNPHW2Pu92gx+ZzWZ1g3B9UnDXuZUyTghMOftYc6EjTU4i6sxGEmeLbv4Z3hA7Kps5wQOp9e1VknhJZbdAe42DG9dpR7fSdqxHf4O7Sg1njWuVGxKebZpyedTYvlwA8X0omsUV+L57CC2ivYfTc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a+VBM/RR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2533C4166A; Thu, 8 Feb 2024 00:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351312; bh=oj028p9Bfp82VhGdol8YywhGeGdWcYwVFqAjOaIyq2A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=a+VBM/RRARb8IGHNobHJ7/wCBuPUE+RNWDE7qcTDQwMhu3XRQ0JXtmMHgprj67GpT gBtGrXaStCuN/MN0u0XAmUOhxP/HIsOIykbDmm6fa1wmY16fwVq5J1gGVABP2xdAog phesGsGhOhTOuIiK4GLwwm+Rdp+ETNIcaHodPI5iAake35cjVLNrHP2Lo2n770Dji8 VCfgyCFM7N9DW3F9zNWojrQC5hymJWoJQ1yCn6jUtXMLK+TBH4RvQeqJFRxtnMme5w WzeZMqXrmKCiyHMWqBicIETCMIdNxheCpofROUn7Ypt7/P4U4lyJbcEQAWzf4tLpXx KyZ7wHdwUDqyQ== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:15:01 -0700 Subject: [PATCH 09/11] s390/boot: vmlinux.lds.S: Handle commonly discarded sections 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-9-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=1308; i=nathan@kernel.org; h=from:subject:message-id; bh=oj028p9Bfp82VhGdol8YywhGeGdWcYwVFqAjOaIyq2A=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZDneq/YZ5DQ/82DhX2+QvKhZa+GrjfU3klxnbU4p8 NDqeTi9o5SFQYyLQVZMkaX6sepxQ8M5ZxlvnJoEM4eVCWQIAxenAExkz2KGP9xL1tQ/uxdurpiZ In7zlYH3p09FhheD+K2fHJLdrpd6dwrD/zB/30vGajUHP7e9SqtcVbxlyQupp7VaAYU2E29uT8n ewAgA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287797747316094 X-GMAIL-MSGID: 1790287797747316094 When building with CONFIG_LD_ORPHAN_WARN after selecting CONFIG_ARCH_HAS_LD_ORPHAN_WARN, there are several series of warnings from the various discardable sections that the kernel adds for build purposes that are not needed at runtime: s390-linux-ld: warning: orphan section `.export_symbol' from `arch/s390/boot/decompressor.o' being placed in section `.export_symbol' s390-linux-ld: warning: orphan section `.discard.addressable' from `arch/s390/boot/decompressor.o' being placed in section `.discard.addressable' s390-linux-ld: warning: orphan section `.modinfo' from `arch/s390/boot/decompressor.o' being placed in section `.modinfo' include/asm-generic/vmlinux.lds.h has a macro for easily discarding these sections across the kernel named COMMON_DISCARDS, use it to clear up the warnings. Signed-off-by: Nathan Chancellor --- arch/s390/boot/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/boot/vmlinux.lds.S b/arch/s390/boot/vmlinux.lds.S index 2bef450e84e9..806bca35e3f1 100644 --- a/arch/s390/boot/vmlinux.lds.S +++ b/arch/s390/boot/vmlinux.lds.S @@ -147,6 +147,7 @@ SECTIONS /* Sections to be discarded */ /DISCARD/ : { + COMMON_DISCARDS *(.eh_frame) *(__ex_table) *(*__ksymtab*) From patchwork Thu Feb 8 00:15:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198143 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2588926dyb; Wed, 7 Feb 2024 16:20:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiiQqKuoxoXrK4pE2ZxBj2HUQjuEJuz/PKIhiJ/63ha7qCp5qSpWVi2CKKbGJHSefyGAFJ X-Received: by 2002:a05:6a20:9f9a:b0:19e:a1a3:b14 with SMTP id mm26-20020a056a209f9a00b0019ea1a30b14mr5141638pzb.1.1707351614674; Wed, 07 Feb 2024 16:20:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351614; cv=pass; d=google.com; s=arc-20160816; b=ZCjFLbAIGU0RmmHP4tHsopBdogSy48go3pi8NUKWcypGPgW/CXbiEvFLDh30TdBjgj EwL50zJR1geVYT2M40pjA3KvoW52yFGnLFGeaIFBOnMg/KqGuge1p9EX+rN4altmZ4z7 7P7R9KuNYt+ul78l/NsNbdthaUJJUOc2RzVu6RV4Sz/E4+CzgURrdD2DPlf1yudnJK5h h360VFnNq+M1f8PSEV265oS2pVNogWsLvleIk5GNkc/vGtdeb919wmtuj39Lseg5efhl UHvzJhx67gTdi2hQnzEohz4LYTINawX7ebTJY5CjnthkIbKlGg0Zqh/pKkPsrtqX6Jz6 qa8A== 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=o935xGCP6/CKlhvoyFw2bvcncNHHy0vjAaq1xFbGTMs=; fh=zsaZpKJh1+orvssvezIOYxULl6+5cVXblNH02bKrw1M=; b=CfPaxvuUPzrag5FxAJqJwKRgKh8kVMdjyNsYXllEmh4jBkUgxn9KHwCtZ4edc3QjqJ Rt1q3LJthZNre4kc1a8ZrORebj4/Rc+wgFHAjeiWit9tRaJ7noLYGd9MPVBOFy9MkAHR KcxWk08XqjMPGkxSxUt9jnjRuzdiyv1dB3QEICvUEEE0l/f3G0KXLkXZBVjsNaJUKHyh d0tj99IiE8nh8fxwyMEF9RZMASFNTCaUJWmEN56ZWGvDRDKqjTmvPudl5x5Huf1zOa67 ulIAsUwnd72XChCnViz/yjf+6rqGs/NbNqjYxnNEv9mH8CMxEXVnTj54f2bu/sz/6HHO R3xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="mgwIc1/O"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57327-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57327-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCV2SaIOzl8jZlurKpHYXVc630YK2A5OVwpdTqAXmevdJ/++f/hBvp2PA0ZAOZBZbh50h/ub33JsGXqAyHKdfIhXLMU4MQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y9-20020a17090264c900b001d4931a0bfcsi2573330pli.638.2024.02.07.16.20.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:20:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57327-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="mgwIc1/O"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57327-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57327-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 05AECB2264D for ; Thu, 8 Feb 2024 00:18:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6469D374FB; Thu, 8 Feb 2024 00:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mgwIc1/O" 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 A3725D50F; Thu, 8 Feb 2024 00:15:13 +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=1707351313; cv=none; b=MSzzeaCdQlIQrvsUOAwrJGyGL14wJ/kE1KBtg/6Kaldow6c71vOtAb5f6rykXe9gqwsSlMs2F7woyP5wE95tY3qFuka2RZnj26xigdPKieh+z0kPUP7GL5yZLPmwZWCYDBhYUzslDFOfRPWWl8P1vleB7t/O9WW2K4q7SFS5CyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351313; c=relaxed/simple; bh=5f+GlBiJxZjhDl4Rv7fblarUlgSt/9TT1t6UVb+Nqdc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=svpIGC09Sn6B+GD3W63B62c3M+JP4SRTr7ACNHq4DC+pfvTnmgDEVCId/K3wjC2//DGHATgbDXQ1L6j6ELkgCWprhuBVXvcVVjrq0K/xpU9yvbTeVcWs7MqGqPyWGGgjJlAqpEj5G/sqH5YvWagR2zYs3+s40gaNSVjbGrEeu34= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mgwIc1/O; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8FEBC43141; Thu, 8 Feb 2024 00:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351313; bh=5f+GlBiJxZjhDl4Rv7fblarUlgSt/9TT1t6UVb+Nqdc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mgwIc1/O9w/qwjY2Nz1d8Romqbt2EbHAFJ/6zmmpqCgNTe5DRalxLnnYfMefQwKli B3nw7sJFvpibiPONx/JsIHBN8cY9/jFRJ3wJ2Dh21tQTYi7PYMl5tanvHWm4h2bXt7 V5fDe2r+qW3vqibeqNDCE1z2/x2ebMHW69N4w0JtpS4pgo0AQccYAPZih4eCLD1DTB VbYlsCe0/yikg4XwZOvT6pRNOmZO6+Gsn7bmuC1Nz7B+v6lNr495Efku0xfkW4LFAU mF8B7ji1So7CRtKPcSPz1/bdeKjCgChXwGzswN9n03oEe26Ovyr0siBKpidfNlCoGB mREmo8WM1+FYw== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:15:02 -0700 Subject: [PATCH 10/11] s390: Select CONFIG_ARCH_WANT_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-10-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=825; i=nathan@kernel.org; h=from:subject:message-id; bh=5f+GlBiJxZjhDl4Rv7fblarUlgSt/9TT1t6UVb+Nqdc=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZDkOuDuKK5xpK7cUecmZlCcX4WW+zOzQ3D2LbgXrZ JyRVF/fUcrCIMbFICumyFL9WPW4oeGcs4w3Tk2CmcPKBDKEgYtTACbi8pGR4VfyW5ncJvPP6xxE Yuo+F2VcEonQ/mnCIHRP2aVSfKL7IUaG14liKw+aPtj99TTj/sTbzfeZ6hh2iyw2Ezluu4B5+mp bLgA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287926906225708 X-GMAIL-MSGID: 1790287926906225708 Now that all sections have been properly accounted for in the s390 linker scripts, select CONFIG_ARCH_WANT_LD_ORPHAN_WARN so that '--orphan-handling' is added to LDFLAGS to catch any future sections that are added without being described in linker scripts. Signed-off-by: Nathan Chancellor --- arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index fe565f3a3a91..771235aee6bf 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -127,6 +127,7 @@ config S390 select ARCH_WANT_DEFAULT_BPF_JIT select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_KERNEL_PMD_MKWRITE + select ARCH_WANT_LD_ORPHAN_WARN select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP select BUILDTIME_TABLE_SORT select CLONE_BACKWARDS2 From patchwork Thu Feb 8 00:15:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 198144 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2589008dyb; Wed, 7 Feb 2024 16:20:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYzQyt+FyoaQTFTxVA4dlKHgLfKIMe1Vzh8HOCDY6osnWO5ifJ10MWuDudOts7yFkcryjwTN44icPWQIr7fSq/06aOAg== X-Google-Smtp-Source: AGHT+IEDQ9qFEL/Aq4PKgBFbmX54FqWr4zk3ObD6P15YC6Izdqep2BLIcP7ueBvQPPJW0cWL2d9k X-Received: by 2002:a05:6a20:720a:b0:19e:4e58:b251 with SMTP id y10-20020a056a20720a00b0019e4e58b251mr1508574pzb.10.1707351628665; Wed, 07 Feb 2024 16:20:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707351628; cv=pass; d=google.com; s=arc-20160816; b=Md1PeY+fyqkkEbJFWSERseUEfcfLIdPTfOwmiHfN6NIjdoAb0TWR5e69lEOb7mD1BL TX5kGT63IeCMkYM0hZLkE3WMCIXSdPDanj39YCUtEjaTX1RU2gG6xjQcdWeAsV+fCgoy maJvI97uOm2v1AnW+e8WSLm8wgKMgDA5KcMAqku+aQYiQNmBwYHMxI0kewpSEhCnfWqE Q9drUx5dbfk/EABqNhgBNufXsCHzf3RCwCb6KjxyAWxIGIaKn7CvpmCNw2GtaOuCjJyP wTTlOnzRaI6WtsD7u+I2gCknR0bC4l75ynH0dLTdHRzOmjq+38ot24dQYr7Xtgfkzfz+ cMyA== 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=fS3ke0FYNUOVvKr4GJE66BS8nu/7rAb5lvcjX/2XRjY=; fh=mJ1g6AEJYT63VbxjuL11lPXj4cpC/cNIBcJAPM4dWtE=; b=Y893n19emp4p0QoA3wCOdq6LgO6iAlFTrBQcvP8wOQMyki6DxRCa3AaVYopOCvsxH0 Eb2nOiaeYYmDaIrno6Hs7gxR1o37PiR0nsvS+No5fuMwAOE+3DBI7CTK+iL1aCekfFRn 5O236ObW17zYdEPCHNbQAGLucU3Xu8bZZEOA6FlhOransvQCy7r1G/liUNHrP/9kagBE +3VnCtt2O1eWyFAmOH989UGuejU/rAJvrQHHhFSWO6LW7frOBho5I53LdIpTnmTcLBJr o5nqjTWUomQgMIndi4kTJmhpXZyvOyt5UjxKUEv60F/4yO9RRh17r/UBsA3gGAg9l2gS AWeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T7CJ6x6X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57328-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57328-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCW2BZvPcKY7wTsYoD7nzjVn1O9+ZEp26N+h82HTSbH3Xjdjc51PAn4puzV3uuni5WbIh5B3KaxY8uYztN3MsGP3o8d5JQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b126-20020a62cf84000000b006e04e153513si2626103pfg.145.2024.02.07.16.20.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:20:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57328-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=T7CJ6x6X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57328-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57328-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 229E4B24222 for ; Thu, 8 Feb 2024 00:18:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FB89D50F; Thu, 8 Feb 2024 00:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="T7CJ6x6X" 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 6CCDE36B17; Thu, 8 Feb 2024 00:15:14 +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=1707351314; cv=none; b=IjOl5zlWOSNbzd6+/9hebujTerZ25wJhqmOXVTCGsG7IFNxWQy+bE9xXdWDXpdPmujRnZEtUlVyCZ785CYdP070y6QH0CHxSSaIt5eJDvrYm5iukq++rAetwvtxyzwncHELHVQTEwNdlLDcp5/jK5W+KdzHTj0F9rYBBaVBGTfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707351314; c=relaxed/simple; bh=CCi+rDw2ejcWvZ1EnjQItxIQNAEtlo1/MQkx4v+uHWI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YLqXxBF5Hp0SPIY+9f0gMiEuffrtWnIGc3V/r5H4fY5T5/HHk2nTUaO89i7Z7vQm1ou9nM28jXTImO5ZFnWB/Tt2GUImbQOnxTr09IUyS5pSLaFEoNsek12oTwjUEhdD68IBn25aIBy+TwWCrh128WecOV/qocRSJMuBOiAFKpc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=T7CJ6x6X; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F8BBC43330; Thu, 8 Feb 2024 00:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707351314; bh=CCi+rDw2ejcWvZ1EnjQItxIQNAEtlo1/MQkx4v+uHWI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=T7CJ6x6XIWpT6ltuWuNXD3Isgp2jG34gY6hwPmQwC59BaC9OcNZWXyf4u5j9S7ZzA dJS1H+RWe8ZGSsOw7gfvO8tebgFZGrpP+0yb6iKf45+YmT0CFD3X5TSS6eigcScAPQ fkBygchQOo5eFx1AF9/bUBSe2iTSE4HCANpCJ5gQIqC7u3Qhr0vMd3dk2gNZ30foVJ o16BsHgHhozDLipNHM+KpF5HSLDYk5cSFwdouOY3MOwtG03sq0KV9+Ds0DoH/3HVux HbfyU9UB8W/c5aGrwizpGyilUu3CVy5RYQq+TiInbcFEz6OAgq8c65y0cAVcPynUBO 6SrO7tb0HW28A== From: Nathan Chancellor Date: Wed, 07 Feb 2024 17:15:03 -0700 Subject: [PATCH 11/11] s390: Link vmlinux with '-z notext' 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-11-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=1081; i=nathan@kernel.org; h=from:subject:message-id; bh=CCi+rDw2ejcWvZ1EnjQItxIQNAEtlo1/MQkx4v+uHWI=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKlHZDlcu6wyHtW0mmT9myax7ljYBO69LD6vjC9bn6pz7 1+5ruFJRykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZhI7lqGX8x5F768tA/muHWQ 7f3Ph9aN82f9iFvVZqi6+I5f962f0SyMDHffRdYYZLmkq3zt/xzLfrH40kSl3KWyi2S0/QxDf/Q s5wIA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790287941364111870 X-GMAIL-MSGID: 1790287941364111870 ld.bfd defaults to '-z notext' (although it is customizable with the '--enable-textrel-check' configure option) but ld.lld defaults to '-z text', which causes issues with building the kernel due to the presence of dynamic relocations in sections that are not writable. ld.lld: error: relocation R_390_64 cannot be used against local symbol; recompile with -fPIC Add '-z notext' to avoid these errors, as this is expected, which matches other architectures. Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song --- arch/s390/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 73873e451686..994f9b3d575f 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -15,7 +15,7 @@ KBUILD_CFLAGS_MODULE += -fPIC KBUILD_AFLAGS += -m64 KBUILD_CFLAGS += -m64 KBUILD_CFLAGS += -fPIE -LDFLAGS_vmlinux := -pie +LDFLAGS_vmlinux := -pie -z notext aflags_dwarf := -Wa,-gdwarf-2 KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ ifndef CONFIG_AS_IS_LLVM