Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp233755rdb; Thu, 22 Feb 2024 01:52:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV9+7NXSA2KxWaGKcGBfrFecEuq++/7LatIzJdz8GAv20Xn8rH9PmrqgMdaSBYZJDq8wfINSqP5mo0nrLGYAwNkTsBJsX+RUmjY+MNH3A== X-Google-Smtp-Source: AGHT+IFbqE06VZNox4VJUbrOtlXCIhHOTWmGx7NBYSKXIKfeg7Hy9w6Et1NukGLPz1lVM7GBgEGJ X-Received: by 2002:a17:906:3b0b:b0:a3e:7f80:ecac with SMTP id g11-20020a1709063b0b00b00a3e7f80ecacmr1717322ejf.12.1708595562305; Thu, 22 Feb 2024 01:52:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708595562; cv=pass; d=google.com; s=arc-20160816; b=PpykMpAdpdVVRzygsc8/6FkD3fsRYZo4j7l34jw1vckW3IsjVZHHFKM9GsHq+ljEmx M0sYqWiLtQ904kCbwZyrKXxhhsVji8VPTfS4u9hPFLLquxaAk7qczclvf/zx89GAuooX be4PrKkeed3MMWlz/hl1Jiuzc++6/2SNsrAFEvFA39aAHWb0fx5C9ZhjgX2gKNwO36RS 4PGTZrb74HWsfYqbXFPyPgU+XeF3rbXzusAq9sbXx52Zh3YjCoLj5TSNJTXhimFJu2E1 1WdUaKD0o7AN2GA0rVJTaPi/X2b9leghN5oi1fkfDwgHtmksg7mE6uJQAiOdssOfPmVb O2Cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=sWqOg9vqpF/hATM4kd4bO7A1Fp4iMXPUWdfKEDmsH50=; fh=FEzmLIU/8t66XrH6+VafM2sdawgjVh4GM84pcSWWPp0=; b=yiJwzEyqde9BNKjInbCIh8pb4HG/nyS66WkTLxPF9EQ6H0C8E1fkb0SUuziOSjpvDb BPc9+BUA0NP+N7J/OxmreOOipku0OFWzUJ7EgHXgWWCL7iV4wnE3gVIaO0Th5Mu3MBl5 Q9rTHmbgQVP0vmglqlmdCtpNfdFQCgaNpiSK3zHukijGpqZj3E2teENOwgsXUpEW9G0K JQR5tsO5BqHmPrcTwYvd15C7u1oXr4aV12aelFGWQQPJGF8g4jYOQwRf5C9xrHmfibqV 9rllrgnzICU53eP6224K+pg6iC6TmeIaDMugNM3UkX1PKedilodXsxIUDGdyleQqr76m viIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=VCbKYGtd; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=c7qnRiXU; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-76274-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76274-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w12-20020a17090652cc00b00a3d2344a467si5223618ejn.118.2024.02.22.01.52.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 01:52:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76274-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=VCbKYGtd; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=c7qnRiXU; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-76274-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76274-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de 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 F3C481F244B5 for ; Thu, 22 Feb 2024 09:52:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49B1A383BA; Thu, 22 Feb 2024 09:52:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="VCbKYGtd"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="c7qnRiXU" Received: from fhigh2-smtp.messagingengine.com (fhigh2-smtp.messagingengine.com [103.168.172.153]) (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 5484C381CF for ; Thu, 22 Feb 2024 09:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.153 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708595555; cv=none; b=B3jQ7HsWhbTWNiQxUgoYetkEbYXt/PI94P0Efho4cmhjzjgSOWVglQkVjRMcnL6Lst7NJUOLBcMDflf8naDht4c9+GOunYRm7QHLdt1FU+NLO/RVa2GZmLApnE1SZ6ozEEPoz5DGYtQWeo5xRu6OelzxTmodqwnqpKM2mD/2vkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708595555; c=relaxed/simple; bh=HOZYXhL4vcrBK8qYEIzFcy8lZeDLT7hOe+iAX+muuHI=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=k/z5MGGQeS0GMR+1uPOs3FcXGpCwotrlITpjx14l2GFFNg+D6t9iE8CIcn683l20NWoNHXKLJI1fOnYtYy0gItxNfDj0/84K3NED2lhe/A5HMwQa96OXOHuCAiLZrFyN9QAG/k2SN1Ov0oD6dCR7/N4nogR69kQI0Vp82cLh4TQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=VCbKYGtd; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=c7qnRiXU; arc=none smtp.client-ip=103.168.172.153 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 2C94411400F7; Thu, 22 Feb 2024 04:52:32 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 22 Feb 2024 04:52:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1708595552; x=1708681952; bh=sWqOg9vqpF /hATM4kd4bO7A1Fp4iMXPUWdfKEDmsH50=; b=VCbKYGtdzIHr+0g+rlNOS5k/W3 pVHXdbxW1T/nVnGxOjRO1BNzN0h/eZzFVRU2rHWZPpDrqYMenFU7TRVzAQV2qFQJ toCDTvlMV94atjLQYej4fdAFmOUjNCJQlLtIoK3BknDQQ0HR7gtzr6SvShsZg0Is T2ucCngQE4R2m0SnT/FHuam1nPKStjR6PXbHODwcuywWu7wAG1YgpOmOa2k3DP5x fo1TatQGblmjDZWXA/x5r5JrUcs23Mk3ZViUjezdpOuDE5HjpBT2WLOpWPZa4aRM OOekMPZ27KGM2aBzEDMmCt73WEvEHjM8tGm+RKKKSyLUeD7fN5LdT65chIag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708595552; x=1708681952; bh=sWqOg9vqpF/hATM4kd4bO7A1Fp4i MXPUWdfKEDmsH50=; b=c7qnRiXUdnRXNntvvqaicsu0Ht3K94DQavYXoGixf8xo cBXptEi5DFQACFBfKScv62ahqOLz/hKjwTeVfn18LtC56S9k70XWrncjvvnEpBG5 7fv2Lpr4cVNy9ZIl4MKHbWnr6rmBvMjzMxZu4bAvRaf3awoyLuV8hbKIek1fBFhn 2lIXpqPf4ZoC/vh+1frUtBujwVQDg7z2nPEh1XmLjDskgcDSiA0Ymc8T53xoIoi2 UAjde8cxUW6S9F+apIf/QeKxthl/whi3T/RtplrIPwAfYBShCX3bDxn+Unl6a+UY rbBiiQM/JC5Bu3//4RkIrkc11FWLlzm50PRVewWy9A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeeggddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeevgeehleejvdefgefftdevvedtudffudefffeggfdvgeffleefudehgffgledu heenucffohhmrghinheplhgushdrshdqqddqrgdprghrtghhrdhinhhfohenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgu sgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 319EBB6008F; Thu, 22 Feb 2024 04:52:31 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-153-g7e3bb84806-fm-20240215.007-g7e3bb848 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <30b01c65-12f2-4ee0-81d5-c7a2da2c36b4@app.fastmail.com> References: <20240220081527.23408-1-liuyuntao12@huawei.com> <1342759e-b967-4ec4-98d5-48146f81f695@app.fastmail.com> <38c09a4b-69cc-4dc5-8a68-e5f5597613ac@huawei.com> <30b01c65-12f2-4ee0-81d5-c7a2da2c36b4@app.fastmail.com> Date: Thu, 22 Feb 2024 10:52:10 +0100 From: "Arnd Bergmann" To: "Yuntao Liu" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: "Russell King" , "Andrew Davis" , "Andrew Morton" , "Kirill A. Shutemov" , "Geert Uytterhoeven" , "Jonathan Corbet" , "Mike Rapoport" , "Eric DeVolder" , "Rob Herring" , "Thomas Gleixner" , "Linus Walleij" Subject: Re: [PATCH -next] arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION Content-Type: text/plain On Wed, Feb 21, 2024, at 16:51, Arnd Bergmann wrote: > I have given your patch some build testing with random > configurations in my build setup and it seems to work > fine with gcc/binutils, but unfortunately I came across > a link failure using clang/lld: I ran into another bug now, this time with CONFIG_XIP_KERNEL=y: no __ex_table in file: vmlinux Failed to sort kernel tables make[4]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1 Essentially you have to modify arch/arm/kernel/vmlinux-xip.lds.S the same way as vmlinux.lds.S: --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -63,7 +63,7 @@ SECTIONS . = ALIGN(4); __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { __start___ex_table = .; - ARM_MMU_KEEP(*(__ex_table)) + ARM_MMU_KEEP(KEEP(*(__ex_table))) __stop___ex_table = .; } @@ -83,7 +83,7 @@ SECTIONS } .init.arch.info : { __arch_info_begin = .; - *(.arch.info.init) + KEEP(*(.arch.info.init)) __arch_info_end = .; } .init.tagtable : { The pv_table is not needed for XIP_KERNEL=y because that requires not patching the kernel. Arnd