From mboxrd@z Thu Jan 1 00:00:00 1970 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 98B3320E5 for ; Fri, 8 Apr 2022 15:04:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6129C385A3; Fri, 8 Apr 2022 15:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649430298; bh=an+fC0xbH99y8i5dJa9nG5z8u5iECRDcXrmVP68kI8c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K0Jhq96efaqthazPlC/NbOp8eIpAAFZh0bIlXGt6SC5Glh5rKb+Y6PuMKATkliOtz UGQWAbhUhrTbL/YLlIJY7Rw3z6KjY7zHRy0LCgQCkrqu9mfPBcjV2DOhOtipjM8z2T 1nYAtpCIyAhsSRwOeCE4Pmj/XX67b8GSZ8qCEgSZ7NeFg8Q/kVBqX3ogQXdKAR3ysG ZcH/1u6k+aaUBnHKLrbsm1f3RMHQ97wyWNcjrOgmHAu9fB6bNuxrAMz913xM5rTziW z9GHWBKgS5Ktp4N0csuZyGIaplPvROivohBRdvjs86vmENyCUhwofndNSR9y1XNExR jS+ICqtz+pnJA== Date: Fri, 8 Apr 2022 08:04:56 -0700 From: Nathan Chancellor To: Mark Rutland Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, keescook@chromium.org, ardb@kernel.org, llvm@lists.linux.dev Subject: Re: allmodconfig builds failing to link on arm64 Message-ID: References: <20220408115407.GA27685@willie-the-truck> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Will and Mark, On Fri, Apr 08, 2022 at 03:45:42PM +0100, Mark Rutland wrote: > On Fri, Apr 08, 2022 at 12:54:07PM +0100, Will Deacon wrote: > > Hi folks, > > Hi Will, > > > Since -rc1 (although I haven't tried bisecting the merge window), I'm > > not able to link allmodconfig for arm64: > > > > aarch64-linux-gnu-ld: .init.data has both ordered [`__patchable_function_entries' in init/main.o] and unordered [`.init_array.1' in virt/lib/irqbypass.o] sections > > aarch64-linux-gnu-ld: final link failed: bad value > > make: *** [Makefile:1158: vmlinux] Error 1 > > > > I'm using an Android clang based on 12.0.6 and LD claims to be > > 2.33.1.20191209. > > I can reproduce that when using the llvm.org 12.0.0 binaries along with the > kernel.org crosstool 9.2.0 binaries (binutils 2.32) to build v5.18-rc1 > allmodconfig. > > I see the failure with (at least) the following combinations that I tested: > > * LLVM 11.0.0 && binutils 2.34 (kernel.org 8.4.0 binaries) > * LLVM 12.0.0 && binutils 2.30 (kernel.org 8.1.0 binaries) > * LLVM 12.0.0 && binutils 2.32 (kernel.org 9.2.0 binaries) > * LLVM 12.0.0 && binutils 2.34 (kernel.org 8.4.0/9.3.0 binaries) > * LLVM 13.0.0 && binutils 2.34 (kernel.org 8.4.0 binaries) > * LLVM 14.0.0 && binutils 2.34 (kernel.org 8.4.0 binaries) > > I *DO NOT* see the failure with the following combinations: > > * LLVM 12.0.0 && binutils 2.36.1 (kernel.org 10.3.0/11.1.0 binaries) > * LLVM 13.0.0 && binutils 2.36.1 (kernel.org 10.3.0/11.1.0 binaries) > * LLVM 14.0.0 && binutils 2.36.1 (kernel.org 10.3.0/11.1.0 binaries) > > So clearly something changed on the binutils side between 2.34 and > 2.36.1, but I don't know whether either behaviour is incorrect, or > whether LLVM implicitly depends upon a newer binutils version. Correct, it sounds like it is 2.36 where this issue disappears: https://github.com/ClangBuiltLinux/linux/issues/1507 https://sourceware.org/bugzilla/show_bug.cgi?id=26256 I don't know if something changed in LLVM to cause this but if it did, it has clearly been there since LLVM 11, so it is probably not worth hunting down. Unfortunately, our testing with just "CC=clang" has been lacking, as we are primarily focused on using the whole LLVM suite, so this could have been around for a while and we just missed it. It sounds like this same issue would be seen with GCC 11+ and older binutils but I am guessing that combination is not quite as common, as GCC 11.1 was released April 2021 and binutils 2.36 had been out for three months at that point. > I don't know why this suddenly became a problem in v5.18-rc1; I'll have > a look. Yes, this part is odd, because according to our issue above, this has been visible for a couple releases. Perhaps some configuration change allows CONFIG_FTRACE and CONFIG_STACK_TRACER to be turned on with allmodconfig now? I think we can probably work around this in Kconfig fairly easily, I can take a look at that today if necessary. Cheers, Nathan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDA1DC433F5 for ; Fri, 8 Apr 2022 15:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WHa3Wn8HADwS6rNIqv3twmMVDcOeFN4vbhtJkwbLn3A=; b=gU0ebrxb9KP3ss Onj82fVSUtpjOcG0r5we62XOqIoBA3NDY8y8mptgF0vCur2cbP7g1qAIhtTsrNJKc073pgUXDC8y1 ihJWu74ZA0YswFlb8AgGKufvFUNc4ttZ/nTqqzHOAfLlMdeDx+Y5UImnCHCP+KiYnrQoYriRbuvHm mBpfIsa9JS4SSqJ60nmefj1eco2uPNv8YvFlXgy5UfM1BLdurhhaj5Z2Jow+h+w88q9pvQAmb0xYS p2NyU3w7g44uNsgx8KpIwcVuemM6SoRQB81eJ1OXLpnmrZ5zRCKZ9nFn11ecEmbJFsIwC7uhHtDv9 nACzWJBhjof03sipEdzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncqAq-0009XA-GW; Fri, 08 Apr 2022 15:05:20 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncqAX-0009P8-Iv for linux-arm-kernel@lists.infradead.org; Fri, 08 Apr 2022 15:05:03 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 94078B82BAB; Fri, 8 Apr 2022 15:04:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6129C385A3; Fri, 8 Apr 2022 15:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649430298; bh=an+fC0xbH99y8i5dJa9nG5z8u5iECRDcXrmVP68kI8c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K0Jhq96efaqthazPlC/NbOp8eIpAAFZh0bIlXGt6SC5Glh5rKb+Y6PuMKATkliOtz UGQWAbhUhrTbL/YLlIJY7Rw3z6KjY7zHRy0LCgQCkrqu9mfPBcjV2DOhOtipjM8z2T 1nYAtpCIyAhsSRwOeCE4Pmj/XX67b8GSZ8qCEgSZ7NeFg8Q/kVBqX3ogQXdKAR3ysG ZcH/1u6k+aaUBnHKLrbsm1f3RMHQ97wyWNcjrOgmHAu9fB6bNuxrAMz913xM5rTziW z9GHWBKgS5Ktp4N0csuZyGIaplPvROivohBRdvjs86vmENyCUhwofndNSR9y1XNExR jS+ICqtz+pnJA== Date: Fri, 8 Apr 2022 08:04:56 -0700 From: Nathan Chancellor To: Mark Rutland Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, keescook@chromium.org, ardb@kernel.org, llvm@lists.linux.dev Subject: Re: allmodconfig builds failing to link on arm64 Message-ID: References: <20220408115407.GA27685@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220408_080502_007251_48A1ADBC X-CRM114-Status: GOOD ( 25.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Will and Mark, On Fri, Apr 08, 2022 at 03:45:42PM +0100, Mark Rutland wrote: > On Fri, Apr 08, 2022 at 12:54:07PM +0100, Will Deacon wrote: > > Hi folks, > > Hi Will, > > > Since -rc1 (although I haven't tried bisecting the merge window), I'm > > not able to link allmodconfig for arm64: > > > > aarch64-linux-gnu-ld: .init.data has both ordered [`__patchable_function_entries' in init/main.o] and unordered [`.init_array.1' in virt/lib/irqbypass.o] sections > > aarch64-linux-gnu-ld: final link failed: bad value > > make: *** [Makefile:1158: vmlinux] Error 1 > > > > I'm using an Android clang based on 12.0.6 and LD claims to be > > 2.33.1.20191209. > > I can reproduce that when using the llvm.org 12.0.0 binaries along with the > kernel.org crosstool 9.2.0 binaries (binutils 2.32) to build v5.18-rc1 > allmodconfig. > > I see the failure with (at least) the following combinations that I tested: > > * LLVM 11.0.0 && binutils 2.34 (kernel.org 8.4.0 binaries) > * LLVM 12.0.0 && binutils 2.30 (kernel.org 8.1.0 binaries) > * LLVM 12.0.0 && binutils 2.32 (kernel.org 9.2.0 binaries) > * LLVM 12.0.0 && binutils 2.34 (kernel.org 8.4.0/9.3.0 binaries) > * LLVM 13.0.0 && binutils 2.34 (kernel.org 8.4.0 binaries) > * LLVM 14.0.0 && binutils 2.34 (kernel.org 8.4.0 binaries) > > I *DO NOT* see the failure with the following combinations: > > * LLVM 12.0.0 && binutils 2.36.1 (kernel.org 10.3.0/11.1.0 binaries) > * LLVM 13.0.0 && binutils 2.36.1 (kernel.org 10.3.0/11.1.0 binaries) > * LLVM 14.0.0 && binutils 2.36.1 (kernel.org 10.3.0/11.1.0 binaries) > > So clearly something changed on the binutils side between 2.34 and > 2.36.1, but I don't know whether either behaviour is incorrect, or > whether LLVM implicitly depends upon a newer binutils version. Correct, it sounds like it is 2.36 where this issue disappears: https://github.com/ClangBuiltLinux/linux/issues/1507 https://sourceware.org/bugzilla/show_bug.cgi?id=26256 I don't know if something changed in LLVM to cause this but if it did, it has clearly been there since LLVM 11, so it is probably not worth hunting down. Unfortunately, our testing with just "CC=clang" has been lacking, as we are primarily focused on using the whole LLVM suite, so this could have been around for a while and we just missed it. It sounds like this same issue would be seen with GCC 11+ and older binutils but I am guessing that combination is not quite as common, as GCC 11.1 was released April 2021 and binutils 2.36 had been out for three months at that point. > I don't know why this suddenly became a problem in v5.18-rc1; I'll have > a look. Yes, this part is odd, because according to our issue above, this has been visible for a couple releases. Perhaps some configuration change allows CONFIG_FTRACE and CONFIG_STACK_TRACER to be turned on with allmodconfig now? I think we can probably work around this in Kconfig fairly easily, I can take a look at that today if necessary. Cheers, Nathan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel