Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp698439rdb; Thu, 22 Feb 2024 17:40:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCULxzxQgnInAuZgywdHdpvEKBKsFkE/yBnv+dWuIaQ8SJRvfqhBUGrZHYMzfYXyqgS6+0TL3KwjQdwse+5iY35AFzT/SIAP6q5QJtGyrw== X-Google-Smtp-Source: AGHT+IHCrTXY54WF1XlpBMbRhWBPc/FTg90oC7kKjVQVQcodfVv0eYIUmbNB0XjUMwqcofTJrfD+ X-Received: by 2002:a1f:ec83:0:b0:4cb:96d5:ac68 with SMTP id k125-20020a1fec83000000b004cb96d5ac68mr811709vkh.11.1708652402359; Thu, 22 Feb 2024 17:40:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708652402; cv=pass; d=google.com; s=arc-20160816; b=xCAQNbptItbesyIBDvPvBSf9CY9PFoH9iUEIzoNqp75WKXX4f44QY6F8zUL5lXmdrG 9jjIKJCgHcE+/ybtV4R4BIpRw754wgBciyT5gwpt0A4IBSJAgOILrryQTN4LvavkwDDR LSeIwRSdmV7mDJ+1h/7rxESwpimT/7s2ZVXygeg91VZxnRyG4S0JYf/7jMBGA1C2GRN0 sgM/x+o4erhaXMEyx10DbRnGPSX+5tiqM24EtInV5VanxW2I9sLJ8UKtq6JDNQyScfFC Rup7rA5oGFiyGERU5LGXcV9+Zh5hjzYbTDhkWBb/sS2dziAjy6DKI00GS0xtiXZmqBgJ 4zUA== 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=Jsfuz2SwJzczw9uasKG0wpzL2wtVmkYVzHZwxtVfQNk=; fh=xy+9uUVudSVwCY4BTFCOqaJf4T2/t2trLSGJ7zbmEb0=; b=h9s++fbGi3OIH3KTyv/wfWj3qU3nEqRaYGHj27a/LOfn7UVgF00WdOCQ9JNIVyHya/ laX2xjv18U9jZ00DkHUA/Bvm1zQiVZ6BG2qPFMI27h76ZwryqWyvEvSnMo1MWHkjcFCb U3MG5tZAo/JTvqbFkU6GWU5RjrQ2REpzKczaipGWJUMhnGfbq4nuCJ5gKfQelV5J0jJp RKbMjimI+VW6IsVpGXdZ+rMOnPhLicYbdjP1VFq59wEWQD8JyVLyfj3Dm518GrUwBNoA aFebpavhNt8QI2xEVTcfitfD+mJ2iBu4k6D2xJUBFjxK9tSEs+2NyqX6DwPMK7vEQMHk WCHg==; 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-77643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f19-20020a05620a409300b007878ab06c11si34032qko.235.2024.02.22.17.40.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 17:40:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; 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-77643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77643-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C3081C22BB6 for ; Fri, 23 Feb 2024 01:40:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC3EE947A; Fri, 23 Feb 2024 01:39:40 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 AF0EEAD4C for ; Fri, 23 Feb 2024 01:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708652380; cv=none; b=RqOJo+hcsC/HKXbStmIDRVpiWioi4i2DPCNyQL0cp5uyaai2uu9Yp53Z3TEYTqdqVVzyB/AG6U5puFIcE/H+GeyrYs8lawbNTSF4LQ68PMb8jdqSwZaWDJkVh/a48Zh70JwO18MndvvbITHKQTulh6jO3QHntUhRYd6HaDBCxgQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708652380; c=relaxed/simple; bh=w6a/lM4JOOIkaLGjwoIWUqUMup/m3aYFAur7x35KVXg=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ceiFJDn5bGNnDBBFnkG7HqQLeMmvSPN2Qd46Bdq+/XHLUBg6EKKg2RifaxEtYnID1AFrt6ZyA0tffZ7ASSLDy/rrLn88yqF7OZ77vIRqNupYrqLuBKT8DElyUsxD+dU9lLBSMtnEYseLXAwNIHKAbgeM1bKacYMSyp63cS2wGTM= 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.191 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.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Tgsxm2fPGz1FLGY; Fri, 23 Feb 2024 09:34:36 +0800 (CST) Received: from dggpemd100004.china.huawei.com (unknown [7.185.36.20]) by mail.maildlp.com (Postfix) with ESMTPS id D2FDA1A016B; Fri, 23 Feb 2024 09:39:29 +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_256_GCM_SHA384) id 15.2.1258.28; Fri, 23 Feb 2024 09:39:29 +0800 Message-ID: <7396cdc0-e878-48fe-85b9-d88611d28444@huawei.com> Date: Fri, 23 Feb 2024 09:39:29 +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> <4e9396ca-460b-49ca-818e-73f0a8997b15@huawei.com> <58297ee9-4f33-4b3b-bd00-b44e86965892@app.fastmail.com> From: "liuyuntao (F)" In-Reply-To: <58297ee9-4f33-4b3b-bd00-b44e86965892@app.fastmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemd100004.china.huawei.com (7.185.36.20) On 2024/2/23 0:04, Arnd Bergmann wrote: > On Thu, Feb 22, 2024, at 12:24, liuyuntao (F) wrote: >> >> The position of the caret has been moved below the right brace >> of { KEEP(*(.vectors.bhb.loop8)) }, indicating that lld is treating >> the entire `KEEP(*(.vectors))` as a file name. This could potentially be >> a bug in lld. Perhaps we can temporarily >> enable the DCE option only when option LD_IS_LLD is disabled, >> like risc-v: >> >> `select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD`. > > I would really like to see this working with lld if at all > possible, as it allows the combination of gc-sections with > lto and CONFIG_TRIM_UNUSED_KSYMS. > > I experimented with lld myself now and I did get a booting > kernel even without the the KEEP() on the vectors. I also When the kernel booted up successfully, was config DCE enabled? > see that this is the only use of OVERLAY in the kernel, so > I hope that we can find a way to make it work with existing > lld after all, either without the KEEP or without the OVERLAY. Yeah, i will try other way to make it work. > > Did you see any problems without the KEEP() on the vectors? > > Arnd Without the KEEP(),disable DCE, qemu boots well, enable DCE,qemu hangs on startup. I experimented with lld using vexpress_defconfig.