Re: [PATCH] bpftool: Try to read btf as raw data if elf read fails

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

 



On Fri, Oct 18, 2019 at 04:48:25PM +0000, Andrii Nakryiko wrote:
> On 10/18/19 3:34 AM, Jiri Olsa wrote:
> > The bpftool interface stays the same, but now it's possible
> > to run it over BTF raw data, like:
> 
> Oh, great, I had similar patch laying around for a while, never got to 
> cleaning it up, though, so thanks for picking this up!
> 
> > 
> >    $ bpftool btf dump file /sys/kernel/btf/vmlinux
> >    libbpf: failed to get EHDR from /sys/kernel/btf/vmlinux
> 
> We should implement this so that we don't get an extra log output with 
> errors. I've been thinking about checking first few bytes of the file. 
> If that matches BTF_MAGIC, then try to parse it as raw BTF, otherwise 
> parse as ELF w/ BTF. Does it make sense?

ok, sounds good

jirka





[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