diff --git a/src/libbpf.c b/src/libbpf.c index 210429c..4533897 100644 --- a/src/libbpf.c +++ b/src/libbpf.c @@ -2279,7 +2279,7 @@ static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict, data = elf_getdata(scn, NULL); if (!scn || !data) { pr_warn("failed to get Elf_Data from map section %d (%s)\n", - obj->efile.maps_shndx, MAPS_ELF_SEC); + obj->efile.btf_maps_shndx, MAPS_ELF_SEC); return -EINVAL; }