summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2024-03-14 19:18:32 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-03-15 14:24:00 -0700
commit10ebe835c937a11870690aa44c7c970fe906ff54 (patch)
treef790b75713a6d9845bf8e2cb9c6d4e489a794264 /tools/bpf
parentee498a38f3177d9ee0213839d3a05b94272aa48c (diff)
downloadlinux-10ebe835c937a11870690aa44c7c970fe906ff54.tar.gz
linux-10ebe835c937a11870690aa44c7c970fe906ff54.tar.bz2
linux-10ebe835c937a11870690aa44c7c970fe906ff54.zip
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
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/gen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 4fa4ade1ce74..540c0f2c4fda 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -121,7 +121,7 @@ static bool get_datasec_ident(const char *sec_name, char *buf, size_t buf_sz)
int i, n;
/* recognize hard coded LLVM section name */
- if (strcmp(sec_name, ".arena.1") == 0) {
+ if (strcmp(sec_name, ".addr_space.1") == 0) {
/* this is the name to use in skeleton */
snprintf(buf, buf_sz, "arena");
return true;