Syncing latest libbpf commits from kernel repository.
Baseline bpf-next commit: da927466a152a9497c05926a95c6aebba6d3ad5b
Checkpoint bpf-next commit: 5e5b03d163e15a40b0fa57c70b4e8edd549b0b98
Baseline bpf commit: 9e8acd9c44a0dd52b2922eeb82398c04e356c058
Checkpoint bpf commit: cd7455f1013ef96d5cbf5c05d2b7c06f273810a6
Alexei Starovoitov (3):
bpf: Add attach_btf_id attribute to program load
libbpf: Auto-detect btf_id of BTF-based raw_tracepoints
bpf: Check types of arguments passed into helpers
Andrii Nakryiko (5):
tools: Sync if_link.h
libbpf: Add bpf_program__get_{type, expected_attach_type) APIs
libbpf: Add uprobe/uretprobe and tp/raw_tp section suffixes
libbpf: Teach bpf_object__open to guess program types
libbpf: Make DECLARE_LIBBPF_OPTS macro strictly a variable declaration
John Fastabend (1):
bpf, libbpf: Add kernel version section parsing back
Kefeng Wang (1):
tools, bpf: Rename pr_warning to pr_warn to align with kernel logging
include/uapi/linux/bpf.h | 28 +-
include/uapi/linux/if_link.h | 2 +
src/bpf.c | 3 +
src/btf.c | 56 +--
src/btf_dump.c | 18 +-
src/libbpf.c | 830 +++++++++++++++++++----------------
src/libbpf.h | 24 +-
src/libbpf.map | 2 +
src/libbpf_internal.h | 8 +-
src/xsk.c | 4 +-
10 files changed, 539 insertions(+), 436 deletions(-)
--
2.17.1
This is a mirror of bpf-next linux tree's
tools/lib/bpf directory plus its supporting header files.
The following files will by sync'ed with bpf-next repo:
src/<->bpf-next/tools/lib/bpf/include/uapi/linux/bpf_common.h<->bpf-next/tools/include/uapi/linux/bpf_common.hinclude/uapi/linux/bpf.h<->bpf-next/tools/include/uapi/linux/bpf.hinclude/uapi/linux/btf.h<->bpf-next/tools/include/uapi/linux/btf.hinclude/uapi/linux/if_link.h<->bpf-next/tools/include/uapi/linux/if_link.hinclude/uapi/linux/if_xdp.h<->bpf-next/tools/include/uapi/linux/if_xdp.hinclude/uapi/linux/netlink.h<->bpf-next/tools/include/uapi/linux/netlink.hinclude/tools/libc_compat.h<->bpf-next/tools/include/tools/libc_compat.h
Other header files at this repo (include/linux/*.h) are reduced versions of
their counterpart files at bpf-next's tools/include/linux/*.h to make compilation
successful.
Build 
libelf is an internal dependency of libbpf and thus it is required to link
against and must be installed on the system for applications to work.
pkg-config is used by default to find libelf, and the program called can be
overridden with PKG_CONFIG.
If using pkg-config at build time is not desired, it can be disabled by setting
NO_PKG_CONFIG=1 when calling make.
To build both static libbpf.a and shared libbpf.so:
$ cd src
$ make
To build only static libbpf.a library in directory build/ and install them together with libbpf headers in a staging directory root/:
$ cd src
$ mkdir build root
$ BUILD_STATIC_ONLY=y OBJDIR=build DESTDIR=root make install
To build both static libbpf.a and shared libbpf.so against a custom libelf dependency installed in /build/root/ and install them together with libbpf headers in a build directory /build/root/:
$ cd src
$ PKG_CONFIG_PATH=/build/root/lib64/pkgconfig DESTDIR=/build/root make install