* Missing .BTF section in vmlinux (x86_64) when building on Yocto
[not found] <CAJQ9wQ_tU-zy-f9rFk_sqiqh7y7WDz2tyYW6EJNzii6Y7AE3SQ@mail.gmail.com>
@ 2022-07-11 5:57 ` Donald Chan
2022-07-11 7:19 ` Jiri Olsa
0 siblings, 1 reply; 6+ messages in thread
From: Donald Chan @ 2022-07-11 5:57 UTC (permalink / raw)
To: bpf; +Cc: daniel, ast
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
The issue exists on x86_64, I also have tried armv7 with the same
result so doesn't seem to be arch-specific.
Thanks
Donald
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Missing .BTF section in vmlinux (x86_64) when building on Yocto
2022-07-11 5:57 ` Missing .BTF section in vmlinux (x86_64) when building on Yocto Donald Chan
@ 2022-07-11 7:19 ` Jiri Olsa
2022-07-11 8:34 ` Jiri Olsa
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Olsa @ 2022-07-11 7:19 UTC (permalink / raw)
To: Donald Chan; +Cc: bpf, daniel, ast
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
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Missing .BTF section in vmlinux (x86_64) when building on Yocto
2022-07-11 7:19 ` Jiri Olsa
@ 2022-07-11 8:34 ` Jiri Olsa
2022-07-11 21:53 ` Donald Chan
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Olsa @ 2022-07-11 8:34 UTC (permalink / raw)
To: Donald Chan; +Cc: bpf, daniel, ast
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
- clang/gcc? versions
- V=1 compile log
- command line options
- tree/branch you're on
- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Missing .BTF section in vmlinux (x86_64) when building on Yocto
2022-07-11 8:34 ` Jiri Olsa
@ 2022-07-11 21:53 ` Donald Chan
2022-07-12 9:12 ` Jiri Olsa
0 siblings, 1 reply; 6+ messages in thread
From: Donald Chan @ 2022-07-11 21:53 UTC (permalink / raw)
To: Jiri Olsa; +Cc: bpf, daniel, ast
On Mon, Jul 11, 2022 at 1:34 AM Jiri Olsa <olsajiri@gmail.com> 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
> - 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Missing .BTF section in vmlinux (x86_64) when building on Yocto
2022-07-11 21:53 ` Donald Chan
@ 2022-07-12 9:12 ` Jiri Olsa
2022-07-14 5:01 ` Donald Chan
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Olsa @ 2022-07-12 9:12 UTC (permalink / raw)
To: Donald Chan; +Cc: Jiri Olsa, bpf, daniel, ast
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@gmail.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Missing .BTF section in vmlinux (x86_64) when building on Yocto
2022-07-12 9:12 ` Jiri Olsa
@ 2022-07-14 5:01 ` Donald Chan
0 siblings, 0 replies; 6+ messages in thread
From: Donald Chan @ 2022-07-14 5:01 UTC (permalink / raw)
To: Jiri Olsa; +Cc: bpf, daniel, ast
On Tue, Jul 12, 2022 at 2:12 AM Jiri Olsa <olsajiri@gmail.com> wrote:
>
> 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@gmail.com> 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
Finally figured out the mystery - I was building on Ubuntu 18.04, and
libelf/elfutils was too old (0.170).
After upgrading to Ubuntu 22.04, I was able to build.
Many thanks!
>
> >
> > > - 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-14 5:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAJQ9wQ_tU-zy-f9rFk_sqiqh7y7WDz2tyYW6EJNzii6Y7AE3SQ@mail.gmail.com>
2022-07-11 5:57 ` Missing .BTF section in vmlinux (x86_64) when building on Yocto Donald Chan
2022-07-11 7:19 ` Jiri Olsa
2022-07-11 8:34 ` Jiri Olsa
2022-07-11 21:53 ` Donald Chan
2022-07-12 9:12 ` Jiri Olsa
2022-07-14 5:01 ` Donald Chan
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.