aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/bpf/libbpf_common.h
diff options
context:
space:
mode:
authorGravatar Andrii Nakryiko <andriin@fb.com> 2020-09-03 13:35:33 -0700
committerGravatar Alexei Starovoitov <ast@kernel.org> 2020-09-03 17:14:40 -0700
commit8505e8709b5eedb7c662354e8436a2a164181109 (patch)
treeafe567cf93b1e30ed0c002b6918af142f4dee5df /tools/lib/bpf/libbpf_common.h
parentlibbpf: Make RELO_CALL work for multi-prog sections and sub-program calls (diff)
downloadlinux-8505e8709b5eedb7c662354e8436a2a164181109.tar.gz
linux-8505e8709b5eedb7c662354e8436a2a164181109.tar.bz2
linux-8505e8709b5eedb7c662354e8436a2a164181109.zip
libbpf: Implement generalized .BTF.ext func/line info adjustment
Complete multi-prog sections and multi sub-prog support in libbpf by properly adjusting .BTF.ext's line and function information. Mark exposed btf_ext__reloc_func_info() and btf_ext__reloc_func_info() APIs as deprecated. These APIs have simplistic assumption that all sub-programs are going to be appended to all main BPF programs, which doesn't hold in real life. It's unlikely there are any users of this API, as it's very libbpf internals-specific. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200903203542.15944-6-andriin@fb.com
Diffstat (limited to 'tools/lib/bpf/libbpf_common.h')
-rw-r--r--tools/lib/bpf/libbpf_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf_common.h b/tools/lib/bpf/libbpf_common.h
index a23ae1ac27eb..947d8bd8a7bb 100644
--- a/tools/lib/bpf/libbpf_common.h
+++ b/tools/lib/bpf/libbpf_common.h
@@ -15,6 +15,8 @@
#define LIBBPF_API __attribute__((visibility("default")))
#endif
+#define LIBBPF_DEPRECATED(msg) __attribute__((deprecated(msg)))
+
/* Helper macro to declare and initialize libbpf options struct
*
* This dance with uninitialized declaration, followed by memset to zero,