Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp277267rdb; Thu, 22 Feb 2024 03:32:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVQM0fO7/CGYb7B1XHXTPpckk3GlwG0KRwKgRQoYEklpSC9cfDhT+ZP5+7iRzZi56y3rRJie6qIDiEsAfSxA+RZR+jmVSGovKqE8XOe7A== X-Google-Smtp-Source: AGHT+IHr4xQWQUdYrg3FvqklvlbSDJwPJn6iMudRoIpY4+ogrcVn5KE8F3iLTxAM9UepGegoiQY/ X-Received: by 2002:a17:906:494d:b0:a3f:4842:2f60 with SMTP id f13-20020a170906494d00b00a3f48422f60mr2700539ejt.70.1708601556463; Thu, 22 Feb 2024 03:32:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708601556; cv=pass; d=google.com; s=arc-20160816; b=gkzNFeYRZnpmIIAkdWhjpi7xIbRcYKvZPzR5EWsQjqnz9gGWIiHLwzyEvD6yTKVPkp gYiUZrAGBXDByVGNncphnSZTe8Pdx3MP+7x74oVvuy6aEcmzarPXEFVlhdGQG3yW+o4q NEaRgaACAQI91vFQSzD3O5zGBOEgvFZqm73sQO9e7cBFCM9HXniklmGdCSArdhPwSKOc YuFHx8qbUuj5vDkfYLTLKj0TuRGZX27A+/8bBWWrtg/F1qTsEeyh01pmVlpWLKirWZSO r7RJEv39OLZ4zmy/O2sv1+DOHT3gz5RzbVJQ53VNWvi8k5Fi5TDce25t5TO7ohAPvFRi 8KLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=+q2aD4ocZlpK1Z4CiJ4MZ/lW4XGcQey51jT2FABfeqc=; fh=xy+9uUVudSVwCY4BTFCOqaJf4T2/t2trLSGJ7zbmEb0=; b=fZ8is/mQbNLEQBbwUU8RYJWqeAvGMcvdSVvUEr0mPQd5PIYeTmMlX3uM58qLNXG1aD RO1MMlq55XrB88AMcYpBvil8V36+pgBbl2Oe0ETC6RSRFZBp5SEindGGjjx8RXgMBnpQ 7MgGoLMuJZ7swr1cBWKk1Fd+HvfOBaEclZNGQEJyI6m7S5fH4Gpf9GNqqTQZRA5/5EMU ytemWG2R5KZfg8L44d0nOPm54A1IM+w7ctN69OJl1StVTNwNXiEFiyFrzAsz3oAGe0D9 7StwbnjdGoybLSQIGSnZsiWS+9wIwHwhw/JMzVChzkxRJ9+/GHvf1zL0N692RbRyRAsr fvSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-76412-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76412-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e24-20020a170906045800b00a3f560843ecsi1091996eja.726.2024.02.22.03.32.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:32:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76412-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; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-76412-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76412-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 E95781F24B44 for ; Thu, 22 Feb 2024 11:32:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6666C41775; Thu, 22 Feb 2024 11:32:14 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 C67D82BB1B for ; Thu, 22 Feb 2024 11:32:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601533; cv=none; b=QBmDKsQQHaUPf8mUwowspMG7RIxcXUGDHOP/NDYvry7nMVfFBUpOcQsRYfkiXdN/4ZIn3nSgPeJnOxj+f4llDSHaXjXg/hwMOxDSYcRUX25slQMC8yPdp2+QeARP/PNdJgYhjPyer2bjXbT8OUExmc7X9YMDQzNBeAIksGc4DFw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601533; c=relaxed/simple; bh=Ru97uhW4Mp0Hm1f4Ldn5NpBPEkuvDi/mpVqHh4WabRE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=MB3MpZ5ORUI1oAbc4Lxcl1hUtLrSenWDwFf5aEnfNTeGz/Fs8zNFt3XJbsjH5PuMmEKSuM7PzEu36hzNzX+DIdaavPpyCvKhHjgjT7uql+IA0q+MJ4fRNV5IDurOKZQrpc2Qfmd1tnhHUc/pFlobWNtpOqfGNKb/xjyFMF3ncW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4TgWCf6PgVzWv2H; Thu, 22 Feb 2024 19:30:22 +0800 (CST) Received: from dggpemd100004.china.huawei.com (unknown [7.185.36.20]) by mail.maildlp.com (Postfix) with ESMTPS id CB500140153; Thu, 22 Feb 2024 19:32:03 +0800 (CST) Received: from [10.67.109.211] (10.67.109.211) by dggpemd100004.china.huawei.com (7.185.36.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.28; Thu, 22 Feb 2024 19:32:03 +0800 Message-ID: <1ae25437-b190-418d-a4e0-aa17d6de59bf@huawei.com> Date: Thu, 22 Feb 2024 19:32:03 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH -next] arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION Content-Language: en-US To: Arnd Bergmann , , CC: Russell King , Andrew Davis , Andrew Morton , "Kirill A. Shutemov" , Geert Uytterhoeven , Jonathan Corbet , Mike Rapoport , Eric DeVolder , Rob Herring , Thomas Gleixner , Linus Walleij 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> From: "liuyuntao (F)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemd100004.china.huawei.com (7.185.36.20) On 2024/2/22 17:52, Arnd Bergmann wrote: > 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: > Thanks a lot. I didn't consider this situation. I will take your advice. Thanks again. > --- 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