Thread (8 messages) flat view 8 messages, 5 authors, 2019-10-21

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

From: Jiri Olsa <hidden>
Date: 2019-10-21 13:54:37
Also in: bpf

On Fri, Oct 18, 2019 at 04:48:25PM +0000, Andrii Nakryiko wrote:
On 10/18/19 3:34 AM, Jiri Olsa wrote:
quoted
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!
quoted
   $ 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help