Re: FAILED: load BTF from vmlinux: Invalid argument

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

 



Em Thu, Aug 03, 2023 at 11:02:46AM -0700, Nick Desaulniers escreveu:
> Hi Martin (and BTF/BPF team),
> I've observed 2 user reports with the error from the subject of this email.
> https://github.com/ClangBuiltLinux/linux/issues/1825
> https://bbs.archlinux.org/viewtopic.php?id=284177
> 
> Any chance you could take a look at these reports and help us figure
> out what's going wrong here?  Nathan and I haven't been able to
> reproduce, but this seems to be affecting OpenMandriva (and Tomasz).
> 
> Sounds like perhaps llvm-objcopy vs gnu objcopy might be a relevant detail?

Masami had a problem with new versions of compilers that was solved
with:

------------------------ 8< --------------------------------------------
> To check that please tweak:
>
> ⬢[acme@toolbox perf-tools-next]$ grep DWARF ../build/v6.2-rc5+/.config
> CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
> # CONFIG_DEBUG_INFO_DWARF4 is not set
> # CONFIG_DEBUG_INFO_DWARF5 is not set
> ⬢[acme@toolbox perf-tools-next]$
>
> i.e. disable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT and enable
> CONFIG_DEBUG_INFO_DWARF4.

Hm, with CONFIG_DEBUG_INFO_DWARF4, no warning were shown.

  LD      .tmp_vmlinux.btf
  BTF     .btf.vmlinux.bin.o
  LD      .tmp_vmlinux.kallsyms1

And

/ # strings /sys/kernel/btf/vmlinux | wc -l
89921
/ # strings /sys/kernel/btf/vmlinux | grep -w kfree
kfree

It seems the BTF is correctly generated. (with DWARF5, the number of symbols
are about 30000.)




[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