Re: [PATCH bpf-next v1 4/6] bpf: selftests: Move test_ksyms_weak test to lskel, add libbpf test
From: Song Liu <song@kernel.org>
Date: 2021-10-07 20:57:51
Also in:
bpf
From: Song Liu <song@kernel.org>
Date: 2021-10-07 20:57:51
Also in:
bpf
On Thu, Oct 7, 2021 at 1:46 PM Kumar Kartikeya Dwivedi [off-list ref] wrote:
[...]
quoted
quoted
/* typeless symbols, default to zero. */@@ -38,7 +37,7 @@ int pass_handler(const void *ctx) /* tests existing symbols. */ rq = (struct rq *)bpf_per_cpu_ptr(&runqueues, 0); if (rq) - out__existing_typed = rq->cpu; + out__existing_typed = 0;Why do we need this change?Since they share the same BPF object for generating skeleton, it needs to remove dependency on CO-RE which gen_loader does not support. If it is kept, we get this: ... libbpf: // TODO core_relo: prog 0 insn[5] rq kind 0 libbpf: prog 'pass_handler': relo #0: failed to relocate: -95 libbpf: failed to perform CO-RE relocations: -95 libbpf: failed to load object 'test_ksyms_weak'
I see. Thanks for the explanation. Song