bpftool: Support multiple .rodata/.data internal maps in skeleton
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 21 Oct 2021 01:43:59 +0000 (18:43 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 Oct 2021 00:10:10 +0000 (17:10 -0700)
commit8654b4d35e6c915ef456c14320ec8720383e81a7
treea38a3bd3f4874b0d9face7d4fa2689de8b4a04f4
parent25bbbd7a444b1624000389830d46ffdc5b809ee8
bpftool: Support multiple .rodata/.data internal maps in skeleton

Remove the assumption about only single instance of each of .rodata and
.data internal maps. Nothing changes for '.rodata' and '.data' maps, but new
'.rodata.something' map will get 'rodata_something' section in BPF
skeleton for them (as well as having struct bpf_map * field in maps
section with the same field name).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211021014404.2635234-6-andrii@kernel.org
tools/bpf/bpftool/gen.c