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) } }