This little patch modifies selftests/bpf/Makefile so it passes the following extra options when invoking gcc-bpf: -gbtf This makes GCC to emit BTF debug info in .BTF and .BTF.ext. -mco-re This tells GCC to generate CO-RE relocations in .BTF.ext. -masm=pseudoc This tells GCC to emit BPF assembler using the pseudo-c syntax. Tested in bpf-next master. No regressions. Signed-off-by: Jose E. Marchesi <jose.marchesi@xxxxxxxxxx> Cc: Yonghong Song <yhs@xxxxxxxx> Cc: Eduard Zingerman <eddyz87@xxxxxxxxx> Cc: david.faust@xxxxxxxxxx Cc: cupertino.miranda@xxxxxxxxxx --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index edc73f8f5aef..702428021132 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -442,7 +442,7 @@ endef # Build BPF object using GCC define GCC_BPF_BUILD_RULE $(call msg,GCC-BPF,$(TRUNNER_BINARY),$2) - $(Q)$(BPF_GCC) $3 -O2 -c $1 -o $2 + $(Q)$(BPF_GCC) $3 -O2 -gbtf -mco-re -masm=pseudoc -c $1 -o $2 endef SKEL_BLACKLIST := btf__% test_pinning_invalid.c test_sk_assign.c -- 2.30.2