@@ -36,4 +36,5 @@ test_cpp
/runqslower
/bench
*.ko
+*.bpfo
xdpxceiver
@@ -355,12 +355,10 @@ $(TRUNNER_BPF_OBJS): $(TRUNNER_OUTPUT)/%.o: \
$$(call $(TRUNNER_BPF_BUILD_RULE),$$<,$$@, \
$(TRUNNER_BPF_CFLAGS))
-$(TRUNNER_BPF_SKELS): $(TRUNNER_OUTPUT)/%.skel.h: \
- $(TRUNNER_OUTPUT)/%.o \
- $(BPFTOOL) \
- | $(TRUNNER_OUTPUT)
+$(TRUNNER_BPF_SKELS): %.skel.h: %.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
$$(call msg,GEN-SKEL,$(TRUNNER_BINARY),$$@)
- $(Q)$$(BPFTOOL) gen skeleton $$< > $$@
+ $(Q)$$(BPFTOOL) gen bpfo $$(<:.o=.bpfo) $$<
+ $(Q)$$(BPFTOOL) gen skeleton $$(<:.o=.bpfo) > $$@
endif
# ensure we set up tests.h header generation rule just once
Pass all individual BPF object files (progs/*.o) through `bpftool gen bpfo` command to validate that BPF static linker doesn't corrupt them. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> --- tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-)