libbpf, selftests/bpf: Adjust libbpf, bpftool, selftests to match LLVM
authorAlexei Starovoitov <ast@kernel.org>
Fri, 15 Mar 2024 02:18:32 +0000 (19:18 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 15 Mar 2024 21:24:00 +0000 (14:24 -0700)
commit10ebe835c937a11870690aa44c7c970fe906ff54
treef790b75713a6d9845bf8e2cb9c6d4e489a794264
parentee498a38f3177d9ee0213839d3a05b94272aa48c
libbpf, selftests/bpf: Adjust libbpf, bpftool, selftests to match LLVM

The selftests use
to tell LLVM about special pointers. For LLVM there is nothing "arena"
about them. They are simply pointers in a different address space.
Hence LLVM diff https://github.com/llvm/llvm-project/pull/85161 renamed:
. macro __BPF_FEATURE_ARENA_CAST -> __BPF_FEATURE_ADDR_SPACE_CAST
. global variables in __attribute__((address_space(N))) are now
  placed in section named ".addr_space.N" instead of ".arena.N".

Adjust libbpf, bpftool, and selftests to match LLVM.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20240315021834.62988-3-alexei.starovoitov@gmail.com
tools/bpf/bpftool/gen.c
tools/lib/bpf/libbpf.c
tools/testing/selftests/bpf/bpf_arena_common.h
tools/testing/selftests/bpf/progs/arena_htab.c
tools/testing/selftests/bpf/progs/arena_list.c
tools/testing/selftests/bpf/progs/verifier_arena.c