diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-10-20 18:44:00 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-10-21 17:10:10 -0700 |
commit | ef9356d392f980b3b192668fa05b2eaaad127da1 (patch) | |
tree | e06f4ed73f3d525fefaf1dca390db07a09332cbd /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
parent | 8654b4d35e6c915ef456c14320ec8720383e81a7 (diff) |
bpftool: Improve skeleton generation for data maps without DATASEC type
It can happen that some data sections (e.g., .rodata.cst16, containing
compiler populated string constants) won't have a corresponding BTF
DATASEC type. Now that libbpf supports .rodata.* and .data.* sections,
situation like that will cause invalid BPF skeleton to be generated that
won't compile successfully, as some parts of skeleton would assume
memory-mapped struct definitions for each special data section.
Fix this by generating empty struct definitions for such data sections.
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-7-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_basic.c')
0 files changed, 0 insertions, 0 deletions