btf_loader: Skip BTF_KIND_DATASEC entries
Just skip them, we have no use for them so far, skipping them will allow us to process the other kinds we have use for. Cc: Andrii Nakryiko <andriin@fb.com> Cc: Daniel Bristot de Oliveira <bristot@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Yonghong Song <yhs@fb.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
96235a74a3
commit
910e060b5c
18
btf_loader.c
18
btf_loader.c
|
@ -366,6 +366,21 @@ static int create_new_variable(struct btf_elf *btfe, void *ptr, struct btf_type
|
|||
return sizeof(*bvar);
|
||||
}
|
||||
|
||||
static int create_new_datasec(struct btf_elf *btfe, void *ptr, int vlen,
|
||||
struct btf_type *tp, uint64_t size, uint32_t id,
|
||||
bool kflag)
|
||||
{
|
||||
//strings_t name = btf_elf__get32(btfe, &tp->name_off);
|
||||
|
||||
//cu__add_tag_with_id(btfe->priv, &datasec->tag, id);
|
||||
|
||||
/*
|
||||
* FIXME: this will not be used to reconstruct some original C code,
|
||||
* its about runtime placement of variables so just ignore this for now
|
||||
*/
|
||||
return vlen * sizeof(struct btf_var_secinfo);
|
||||
}
|
||||
|
||||
static int create_new_tag(struct btf_elf *btfe, int type, struct btf_type *tp, uint32_t id)
|
||||
{
|
||||
unsigned int type_id = btf_elf__get32(btfe, &tp->type);
|
||||
|
@ -447,6 +462,9 @@ static int btf_elf__load_types(struct btf_elf *btfe)
|
|||
case BTF_KIND_VAR:
|
||||
vlen = create_new_variable(btfe, ptr, type_ptr, size, type_index);
|
||||
break;
|
||||
case BTF_KIND_DATASEC:
|
||||
vlen = create_new_datasec(btfe, ptr, vlen, type_ptr, size, type_index, kflag);
|
||||
break;
|
||||
case BTF_KIND_VOLATILE:
|
||||
case BTF_KIND_PTR:
|
||||
case BTF_KIND_CONST:
|
||||
|
|
Loading…
Reference in New Issue