]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: identify maps by section index in addition to offset
authorAndrii Nakryiko <andriin@fb.com>
Mon, 17 Jun 2019 19:26:54 +0000 (12:26 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 17 Jun 2019 22:10:40 +0000 (00:10 +0200)
commit165c3ef40e9ba4707cb5d1f2fb9f387d2566c408
treecca3be34591c388b5859afe0d29063591142809c
parent16dfc771b2d3f3cef5ce8e95a98b7e1ef4059375
libbpf: identify maps by section index in addition to offset

To support maps to be defined in multiple sections, it's important to
identify map not just by offset within its section, but section index as
well. This patch adds tracking of section index.

For global data, we record section index of corresponding
.data/.bss/.rodata ELF section for uniformity, and thus don't need
a special value of offset for those maps.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c