Skip to content
Commit a6cc6b34 authored by Matt Smith's avatar Matt Smith Committed by Andrii Nakryiko
Browse files

bpftool: Provide a helper method for accessing skeleton's embedded ELF data



This adds a skeleton method X__elf_bytes() which returns the binary data of
the compiled and embedded BPF object file. It additionally sets the size of
the return data to the provided size_t pointer argument.

The assignment to s->data is cast to void * to ensure no warning is issued if
compiled with a previous version of libbpf where the bpf_object_skeleton field
is void * instead of const void *

Signed-off-by: default avatarMatt Smith <alastorze@fb.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210901194439.3853238-3-alastorze@fb.com
parent 08a6f22e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment