BPF List
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Donald Chan <hoiho.chan@gmail.com>
Cc: bpf@vger.kernel.org, daniel@iogearbox.net, ast@kernel.org
Subject: Re: Missing .BTF section in vmlinux (x86_64) when building on Yocto
Date: Mon, 11 Jul 2022 09:19:41 +0200	[thread overview]
Message-ID: <YsvPDfSE6wflDtpA@krava> (raw)
In-Reply-To: <CAJQ9wQ_b=ssxO4RaQ4tLc723ubOXCaTUpmghebc94bYWQ+cBsg@mail.gmail.com>

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

  reply	other threads:[~2022-07-11  7:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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

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=YsvPDfSE6wflDtpA@krava \
    --to=olsajiri@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hoiho.chan@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox