summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/lib/bpf/libbpf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 1c859b32968d..7544d7d09160 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1868,6 +1868,8 @@ static int bpf_object__init_user_maps(struct bpf_object *obj, bool strict)
continue;
if (sym.st_shndx != obj->efile.maps_shndx)
continue;
+ if (GELF_ST_TYPE(sym.st_info) == STT_SECTION)
+ continue;
nr_maps++;
}
/* Assume equally sized map definitions */