Skip to content
Commit 161ecd53 authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by Andrii Nakryiko
Browse files

libbpf: Properly ignore STT_SECTION symbols in legacy map definitions



The previous patch to ignore STT_SECTION symbols only added the ignore
condition in one of them. This fails if there's more than one map
definition in the 'maps' section, because the subsequent modulus check will
fail, resulting in error messages like:

libbpf: elf: unable to determine legacy map definition size in ./xdpdump_xdp.o

Fix this by also ignoring STT_SECTION in the first loop.

Fixes: c3e8c44a ("libbpf: Ignore STT_SECTION symbols in 'maps' section")
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210929213837.832449-1-toke@redhat.com
parent de21d8bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment