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