Andrii Nakryiko 0d6988e16a libbpf: Fix section counting logic
e_shnum does include section  and as such is exactly the number of ELF
sections that we need to allocate memory for to use section indices as
array indices. Fix the off-by-one error.

This is purely accounting fix, previously we were overallocating one
too many array items. But no correctness errors otherwise.

Fixes: 25bbbd7a444b ("libbpf: Remove assumptions about uniqueness of .rodata/.data/.bss maps")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20211103173213.1376990-5-andrii@kernel.org
2021-11-03 13:25:37 -07:00
..
2021-10-25 20:39:41 -07:00
2021-11-03 13:25:37 -07:00
2021-10-25 20:39:41 -07:00
2021-10-01 22:54:38 +02:00
2021-11-01 18:12:44 -07:00