]> 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)
commit9972e34ba9c223dd399dc114966e0df16e92de9f
treecca3be34591c388b5859afe0d29063591142809c
parent053658a441c050fa90241df6ef23e5adf522c8d7
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