Message ID | 20240207-s390-lld-and-orphan-warn-v1-7-8a665b3346ab@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-57324-ouuuleilei=gmail.com@vger.kernel.org> 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 <ouuuleilei@gmail.com> (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 <ouuuleilei@gmail.com>; 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 <nathan@kernel.org> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 <nathan@kernel.org> 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 |
Series |
[01/11] s390: boot: Add support for CONFIG_LD_ORPHAN_WARN
|
|
Commit Message
Nathan Chancellor
Feb. 8, 2024, 12:14 a.m. UTC
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 <nathan@kernel.org>
---
arch/s390/boot/vmlinux.lds.S | 2 ++
1 file changed, 2 insertions(+)
Comments
On Wed, Feb 7, 2024 at 4:15 PM Nathan Chancellor <nathan@kernel.org> wrote: > > 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 <nathan@kernel.org> > --- > 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. > > -- > 2.43.0 > Reviewed-by: Fangrui Song <maskray@google.com>
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.