Re: arm-linux-gnueabi-ld: error: .btf.vmlinux.bin.o is already in final BE8 format

From: Philip Li
Date: Thu Sep 14 2023 - 06:16:53 EST


On Thu, Sep 14, 2023 at 06:11:12PM +0800, Philip Li wrote:
> On Thu, Sep 14, 2023 at 07:08:14AM +0200, Arnd Bergmann wrote:
> > On Thu, Sep 14, 2023, at 05:45, kernel test robot wrote:
> > >
> > > If you fix the issue in a separate patch/commit (i.e. not just a new
> > > version of
> > > the same patch/commit), kindly add following tags
> > > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > > | Closes:
> > > https://lore.kernel.org/oe-kbuild-all/202309141131.pNe5J6HH-lkp@xxxxxxxxx/
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > >>> arm-linux-gnueabi-ld: error: .btf.vmlinux.bin.o is already in final BE8 format
> > > arm-linux-gnueabi-ld: failed to merge target specific data of file
> > > .btf.vmlinux.bin.o
> >
> > It's a completely unrelated issue at the link stage that gets
> > exposed by fixing the other bug. I don't see this in my
>
> Thanks Arnd for the info, we will check and avoid wrong bisection
> for this. Sorry for the noise.

BTW: i found this false positive had been reported multiple times in history,
in your previous reply [0], you had mentioned below to add a Kconfig dependency,
is it the workaround you refer to?

>
> >> arm-linux-gnueabi-ld: error: .btf.vmlinux.bin.o is already in final BE8 format
> arm-linux-gnueabi-ld: failed to merge target specific data of file .btf.vmlinux.bin.o

I had a look at this bug, and found that this is not caused by my commit, but
rather is the result of CONFIG_CPU_BIG_ENDIAN with BE8 format being
incompatible with CONFIG_DEBUG_INFO_BTF.

I'm sure there is an easy fix but I have not found it. Should we just
add a Kconfig
dependency to prevent this, or does anyone have an idea for a proper fix?

https://lore.kernel.org/oe-kbuild-all/CAK8P3a3dvzLhAGV8rdCpX__54vkL0=e5pACUY-es3xiJau=uwg@xxxxxxxxxxxxxx/

>
> > randconfig builds right now, so I probably have a workaround for
> > it somewhere, but I can't find it.
> >
> > Arnd