]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libbpf: Support opening bpf objects of either endianness
authorTony Ambardar <tony.ambardar@gmail.com>
Mon, 16 Sep 2024 08:37:44 +0000 (01:37 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Oct 2024 00:47:36 +0000 (17:47 -0700)
commitbcc60abd67c7741a065480df4875534f62f758b1
tree752d3fe262f2ecff34cc710a9f8be33609082f3b
parentcf579164e9ea9cd41c7c1da931683a319d224890
libbpf: Support opening bpf objects of either endianness

Allow bpf_object__open() to access files of either endianness, and convert
included BPF programs to native byte-order in-memory for introspection.
Loading BPF objects of non-native byte-order is still disallowed however.

Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/26353c1a1887a54400e1acd6c138fa90c99cdd40.1726475448.git.tony.ambardar@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf_internal.h