diff options
author | James Hilliard <james.hilliard1@gmail.com> | 2022-08-01 02:26:49 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-08-05 00:39:07 +0300 |
commit | 47ea7417b0744324424405fc1207e266053237a9 (patch) | |
tree | a22d754b60690412ceb85acdbc40613c44bce1db /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | f86d1fbbe7858884d6754534a0afbb74fc30bc26 (diff) | |
download | linux-47ea7417b0744324424405fc1207e266053237a9.tar.xz |
libbpf: Skip empty sections in bpf_object__init_global_data_maps
The GNU assembler generates an empty .bss section. This is a well
established behavior in GAS that happens in all supported targets.
The LLVM assembler doesn't generate an empty .bss section.
bpftool chokes on the empty .bss section.
Additionally in bpf_object__elf_collect the sec_desc->data is not
initialized when a section is not recognized. In this case, this
happens with .comment.
So we must check that sec_desc->data is initialized before checking
if the size is 0.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20220731232649.4668-1-james.hilliard1@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions