Re: Missing .BTF section in vmlinux (x86_64) when building on Yocto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 11, 2022 at 02:53:58PM -0700, Donald Chan wrote:
> On Mon, Jul 11, 2022 at 1:34 AM Jiri Olsa <olsajiri@xxxxxxxxx> wrote:
> >
> > On Mon, Jul 11, 2022 at 09:19:45AM +0200, Jiri Olsa wrote:
> > > On Sun, Jul 10, 2022 at 10:57:01PM -0700, Donald Chan wrote:
> > > > Hi,
> > > >
> > > > I am trying to enable CONFIG_DEBUG_INFO_BTF when building a
> > > > Yocto-based Linux kernel....but it is failing with this error:
> > > >
> > > > |   LD      .tmp_vmlinux.btf
> > > > |   BTF     .btf.vmlinux.bin.o
> > > > |   LD      .tmp_vmlinux.kallsyms1
> > > > |   KSYMS   .tmp_vmlinux.kallsyms1.S
> > > > |   AS      .tmp_vmlinux.kallsyms1.S
> > > > |   LD      .tmp_vmlinux.kallsyms2
> > > > |   KSYMS   .tmp_vmlinux.kallsyms2.S
> > > > |   AS      .tmp_vmlinux.kallsyms2.S
> > > > |   LD      vmlinux
> > > > |   BTFIDS  vmlinux
> > > > | FAILED: load BTF from vmlinux: No such file or directory
> > > >
> > > > I dug deeper and it seems that the resolve_btfids utility is not able
> > > > to find any relevant .BTF section (at btf__parse from function
> > > > symbols_resolve).
> > > >
> > > > Dumped the vmlinux and also confirmed there is only .BTF_ids section:
> > > >
> > > >   [2993] .rela___ksymtab_g RELA             0000000000000000  17174de0
> > > >        0000000000000048  0000000000000018   I      22807   2992     8
> > > >   [2994] .BTF_ids          PROGBITS         0000000000000000  0105c504
> > > >        00000000000000fc  0000000000000000   A       0     0     1
> > > >
> > > > What could be wrong? Sample config is available at
> > > > https://gist.github.com/hoiho-amzn/964eb0cf2b4459f6775d7af1da7b4056
> >
> > I compiled x86_64 bpf-next/master kernel with your config with no problems,
> > could you share more details? like:
> >   - version of dwarves/pahole
> 
> $ pahole --version
> v1.22
> 
> >   - clang/gcc? versions
> >   - V=1 compile log
> >   - command line options
> 
> I will need some more time to gather the logs. Hopefully the pahole
> and kernel branch will give some initial clue.
> 
> >   - tree/branch you're on
> 
> This is from Yocto and they use 5.15 -
> https://git.yoctoproject.org/linux-yocto/tree/?h=v5.15/standard/base&id=ebfb1822e9f9726d8c587fc0f60cfed43fa0873e

could you test that on either bpf/master or bpf-next/master tree?

jirka

> 
> >   - anything else ;-)
> >
> > thanks,
> > jirka
> >
> > > >
> > > > The issue exists on x86_64, I also have tried armv7 with the same
> > > > result so doesn't seem to be arch-specific.
> > >
> > > hi,
> > > do you use any special command line options?
> > > what tree/branch are you on?
> > >
> > > thanks,
> > > jirka
> > >
> > > >
> > > > Thanks
> > > > Donald



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux