tools/bpf: remove btf__get_strings() superseded by raw data API

Now that we have btf__get_raw_data() it's trivial for tests to iterate
over all strings for testing purposes, which eliminates the need for
btf__get_strings() API.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
Andrii Nakryiko 2019-02-08 11:19:39 -08:00 committed by Alexei Starovoitov
parent ae4ab4b411
commit 49b57e0d01
4 changed files with 26 additions and 23 deletions

View file

@ -449,13 +449,6 @@ const void *btf__get_raw_data(const struct btf *btf, __u32 *size)
return btf->data;
}
void btf__get_strings(const struct btf *btf, const char **strings,
__u32 *str_len)
{
*strings = btf->strings;
*str_len = btf->hdr->str_len;
}
const char *btf__name_by_offset(const struct btf *btf, __u32 offset)
{
if (offset < btf->hdr->str_len)