2021-06-10 08:10:03

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the ftrace tree

Hi all,

After merging the ftrace tree, today's linux-next build (powerpc
allyesconfig) failed like this:

Cannot find symbol for section 255: .text.opal_int_set_mfrr.
arch/powerpc/platforms/powernv/opal-call.o: failed

and many more similar.

Caused by commit

9e419de4c678 ("recordmcount: Correct st_shndx handling")

(I bisected it to this.)

I have reverted that commit for today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-06-10 15:08:52

by Steven Rostedt

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the ftrace tree

On Thu, 10 Jun 2021 10:26:39 +0200
Peter Zijlstra <[email protected]> wrote:

> On Thu, Jun 10, 2021 at 06:08:25PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the ftrace tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> >
> > Cannot find symbol for section 255: .text.opal_int_set_mfrr.
> > arch/powerpc/platforms/powernv/opal-call.o: failed
> >
> > and many more similar.
> >
> > Caused by commit
> >
> > 9e419de4c678 ("recordmcount: Correct st_shndx handling")
>
> Argh.. lemme try and reproduce :/

I'll go and revert this patch, and wait for a new version from Peter.

Hmm, crap, this is also sent to Linus. I'll stop that too.

-- Steve

2021-06-15 06:53:00

by Mark-PK Tsai (蔡沛剛)

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the ftrace tree

>
> On Thu, 10 Jun 2021 10:26:39 +0200
> Peter Zijlstra <[email protected]> wrote:
>
> > On Thu, Jun 10, 2021 at 06:08:25PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > After merging the ftrace tree, today's linux-next build (powerpc
> > > allyesconfig) failed like this:
> > >
> > > Cannot find symbol for section 255: .text.opal_int_set_mfrr.
> > > arch/powerpc/platforms/powernv/opal-call.o: failed
> > >
> > > and many more similar.
> > >
> > > Caused by commit
> > >
> > > 9e419de4c678 ("recordmcount: Correct st_shndx handling")
> >
> > Argh.. lemme try and reproduce :/
>
> I'll go and revert this patch, and wait for a new version from Peter.
>
> Hmm, crap, this is also sent to Linus. I'll stop that too.
>
> -- Steve

I found the the build fail is because PPC64 is big endian and this
patch use st_shndx directyly.

Here is the case which cause this problem:
recordmcount search symbol for txtndx = 255(0xff), but the
corresponding symbol has st_shndx = 0xff00(bit endian) which
equals SHN_LORESERVE, so the updated get_symindex() return 0.

I send the patch v2 to fix it.
https://lore.kernel.org/lkml/[email protected]/

Below is the test environment I used:
https://musl.cc/powerpc64-linux-musl-cross.tgz
make allyesconfig CROSS_COMPILE=powerpc64-linux-musl- ARCH=powerpc
make vmlinux CROSS_COMPILE=powerpc64-linux-musl- ARCH=powerpc