Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3320282pxu; Tue, 8 Dec 2020 09:00:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDZbKPJzbGKtcjPOCcUiJtxDZN+rbQauhXVLuqgydTeJaQF3STLAf+qFPSvxHMgc+Gghgl X-Received: by 2002:aa7:c353:: with SMTP id j19mr9196539edr.204.1607446843587; Tue, 08 Dec 2020 09:00:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607446843; cv=none; d=google.com; s=arc-20160816; b=QI5DD3a8JfGWJ3oeiwusFaYLobn33NwaBs8TNDwfve/lDfbvSH9qpCkzgE3Um8hPwW PgCdh7V2/VfyKqhWMZQ7UIgLj1HQserSadzs1A3wl/G0owrwZXs4Rk+jTcPPICC+/9lb IvOjqU/wToSpFwkkz2gJaL/PzRiRc4Kq+5mpWpWa4t1h3FNPbfynZq/b/GDqXKhr0AWy iOKZIE5ZsccFqB2joAIsYWicpFLqDhxKZiW2kMzubRCbTuTrovCyVESI9EvKwhgLJAtG /jf4s0+TKTqlgPggCEJCHrQSAAuAh1QMJ1SaxZjTbv/Uyr2i9cUlYdjhKbm2Y1mcX3Po uDeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=atu8eOwUftGy48FFlqHCvDSBF7USg91f9aIq9NnuiNM=; b=CNdqBYMvfS8OjSKvwPEB/OOzsrC1GvysSO0Z+aLAOvQFMfhp6zPYZPIogUN6A9j9qe 1o5e9z20I7skCNdSpWLK62pyviDHuSGi2wMEZ7wwXzkQakyU/d/xDm01eN++AHIIif9b 0rvWqvvMb+l5vWHw23JH295boQ1xURyxi45EzYnsmwz9qlf1vw0tWX2oD++VmYaB5tgM kS4t/9vtskT2m1xKOQwhpZOkd3Jbh4yiyAEmUO2u4CFinJnbcsNCB+p6OTBBPxK4BWE4 xwY2dUFh+B6gFgqGOJd6enM/Dxq/jqs2nWHM1c/V5nU7ryMQWOt+jBqC22EbMAluiGac BtDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rKCUm2Ck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si4287622edg.295.2020.12.08.09.00.18; Tue, 08 Dec 2020 09:00:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rKCUm2Ck; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730512AbgLHQ5M (ORCPT + 99 others); Tue, 8 Dec 2020 11:57:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:50816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728752AbgLHQ5L (ORCPT ); Tue, 8 Dec 2020 11:57:11 -0500 X-Gm-Message-State: AOAM5323WPJTvM6NiM3KhThKK95sHjoVMCgGZdMcCNRYtI/+c087nc5T s9An5cgP2lkMPkJiSDZJmgXGzc22w4nzHNT4j3w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607446591; bh=B1Ufsz/HjvgeN7kz3QDMw7S3GkByLm0NCuUVzAQn1Nk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rKCUm2Ck4ZHiGtV3Faw/xe/XwRxizs0Y1E8mPa2BPGo+iAQuGAACvB1lE17EvxzKg sdJSkWu621PR6JmuUkZx6X8EHHlXlnOsdG0rDzeO7AVEOFzr87aOubmE2c7gzWt3aK eNJx8xYeGVKWGGDahCTTMnavuRRk2BKfmjTZ/05LYvPKiXmaLW2bTmwopmaLfdSvc0 23Vwwr+wxXb8d34MTPd7sKBTslRqgRAlCPdSJcelZFlAj4eFwgUY33mKDeCsiWNeEd r4UMsDp/eQJwFwFv7h6XQMlireK6JR/Smu8K5arF+Eg7NP6qod4JmTEKKPd5LR/6hD 7j/SxXQTXGltQ== X-Received: by 2002:a9d:be1:: with SMTP id 88mr17705895oth.210.1607446590334; Tue, 08 Dec 2020 08:56:30 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 8 Dec 2020 17:56:13 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Sami Tolvanen Cc: Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , linux-pci Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2020 at 5:53 PM 'Sami Tolvanen' via Clang Built Linux wrote: > > > A small update here: I see this behavior with every single module > > build, including 'tinyconfig' with one module enabled, and 'defconfig'. > > The .o file here is a thin archive of the bitcode files for the > module. We compile .lto.o from that before modpost, because we need an > ELF binary to process, and then reuse the .lto.o file when linking the > final module. > > At no point should we link the .o file again, especially not with > .lto.o, because that would clearly cause every symbol to be > duplicated, so I'm not sure what goes wrong here. Here's the relevant > part of scripts/Makefile.modfinal: > > ifdef CONFIG_LTO_CLANG > # With CONFIG_LTO_CLANG, reuse the object file we compiled for modpost to > # avoid a second slow LTO link > prelink-ext := .lto > ... > $(modules): %.ko: %$(prelink-ext).o %.mod.o scripts/module.lds FORCE > +$(call if_changed,ld_ko_o) Ah, it's probably a local problem now, as I had a merge conflict against linux-next in this Makefile and I must have resolved the conflict incorrectly. Arnd