Handle no-BTF object files better
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpftool: improve skeleton generation for objects without BTFtools/ | +64 | 0 replies | |
| 2/3 | libbpf: skip BTF fixup if object file has no BTFtools/ | +3 | 1 reply | |
| 3/3 | selftests/bpf: allow compiling BPF objects without BTFtools/ tools/ tools/ | +56 | 10 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by.
| Patch | Jiri Olsa |
|---|---|
| 1/3 | |
| 2/3 | T-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next 0/3] Handle no-BTF object files better
Fix two issues caused by BPF object files with missing BTF type information:
1. BPF skeleton generated for BPF object files that use global variables but are compiled without BTF won't compile.
2. BPF static linker will crash attempting to fix up BTF for input object file with no BTF.
This patch set also extends static linking selftest to validate correct handling of both conditions now. For that, selftests Makefile is enhanced to allow selecting whether a given BPF object file should be compiled with BTF or not, based on naming convention (.nobtf.c suffix).
Andrii Nakryiko (3):
bpftool: improve skeleton generation for objects without BTF
libbpf: skip BTF fixup if object file has no BTF selftests/bpf: allow compiling BPF objects without BTF
tools/bpf/bpftool/gen.c | 81 +++++++++++++++---- tools/lib/bpf/linker.c | 3 + tools/testing/selftests/bpf/Makefile | 21 +++-- .../selftests/bpf/prog_tests/static_linked.c | 6 +- .../bpf/progs/test_static_linked3.nobtf.c | 36 +++++++++ 5 files changed, 123 insertions(+), 24 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/test_static_linked3.nobtf.c
Signature · 1 line
2.30.2