aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Marchevsky <davemarchevsky@fb.com>2022-01-31 17:46:10 -0800
committerAndrii Nakryiko <andrii.nakryiko@gmail.com>2022-02-04 10:27:02 -0800
commit74dcd1bf6ad0286a2466401a2fb2694d8dc381ba (patch)
treee9766ca57b2e00edadb7ab66cd76eb4e5b59467f /src
parent9f276b240b2e4a9e0a1446fdc02ce7e593d90242 (diff)
downloadlibbpf-74dcd1bf6ad0286a2466401a2fb2694d8dc381ba.tar.gz
libbpf: Deprecate btf_ext rec_size APIs
btf_ext__{func,line}_info_rec_size functions are used in conjunction with already-deprecated btf_ext__reloc_{func,line}_info functions. Since struct btf_ext is opaque to the user it was necessary to expose rec_size getters in the past. btf_ext__reloc_{func,line}_info were deprecated in commit 8505e8709b5ee ("libbpf: Implement generalized .BTF.ext func/line info adjustment") as they're not compatible with support for multiple programs per section. It was decided[0] that users of these APIs should implement their own .btf.ext parsing to access this data, in which case the rec_size getters are unnecessary. So deprecate them from libbpf 0.7.0 onwards. [0] Closes: https://github.com/libbpf/libbpf/issues/277 Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220201014610.3522985-1-davemarchevsky@fb.com
Diffstat (limited to 'src')
-rw-r--r--src/btf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/btf.h b/src/btf.h
index 96b44d5..b10729f 100644
--- a/src/btf.h
+++ b/src/btf.h
@@ -168,8 +168,10 @@ int btf_ext__reloc_line_info(const struct btf *btf,
const struct btf_ext *btf_ext,
const char *sec_name, __u32 insns_cnt,
void **line_info, __u32 *cnt);
-LIBBPF_API __u32 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext);
-LIBBPF_API __u32 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext);
+LIBBPF_API LIBBPF_DEPRECATED("btf_ext__reloc_func_info is deprecated; write custom func_info parsing to fetch rec_size")
+__u32 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext);
+LIBBPF_API LIBBPF_DEPRECATED("btf_ext__reloc_line_info is deprecated; write custom line_info parsing to fetch rec_size")
+__u32 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext);
LIBBPF_API int btf__find_str(struct btf *btf, const char *s);
LIBBPF_API int btf__add_str(struct btf *btf, const char *s);