All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>,
	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
Date: Fri, 8 Apr 2022 08:04:56 -0700	[thread overview]
Message-ID: <YlBPGFs2PMNX6est@dev-arch.thelio-3990X> (raw)
In-Reply-To: <YlBKln4m6JiLRrjl@lakrids>

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

WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>,
	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
Date: Fri, 8 Apr 2022 08:04:56 -0700	[thread overview]
Message-ID: <YlBPGFs2PMNX6est@dev-arch.thelio-3990X> (raw)
In-Reply-To: <YlBKln4m6JiLRrjl@lakrids>

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

  reply	other threads:[~2022-04-08 15:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 11:54 allmodconfig builds failing to link on arm64 Will Deacon
2022-04-08 14:45 ` Mark Rutland
2022-04-08 15:04   ` Nathan Chancellor [this message]
2022-04-08 15:04     ` Nathan Chancellor
2022-04-08 15:06   ` Mark Rutland
2022-04-08 16:13     ` Will Deacon
2022-04-08 17:17       ` Nathan Chancellor
2022-04-08 18:37         ` Nathan Chancellor
2022-04-13  9:26           ` Will Deacon
2022-04-13 15:04             ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YlBPGFs2PMNX6est@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.