* [PATCH 1/1] libbpf: Provide GELF_ST_VISIBILITY() define for older libelf
@ 2021-05-08 15:22 Arnaldo Carvalho de Melo
2021-05-11 21:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-05-08 15:22 UTC (permalink / raw)
To: Andrii Nakryiko; +Cc: Alexei Starovoitov, Jiri Olsa, David Miller, bpf
Where that macro isn't available.
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/lib/bpf/libbpf_internal.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
index ee426226928f1283..acbcf6c7bdf82cf2 100644
--- a/tools/lib/bpf/libbpf_internal.h
+++ b/tools/lib/bpf/libbpf_internal.h
@@ -41,6 +41,11 @@
#define ELF_C_READ_MMAP ELF_C_READ
#endif
+/* Older libelf all end up in this expression, for both 32 and 64 bit */
+#ifndef GELF_ST_VISIBILITY
+#define GELF_ST_VISIBILITY(o) ((o) & 0x03)
+#endif
+
#define BTF_INFO_ENC(kind, kind_flag, vlen) \
((!!(kind_flag) << 31) | ((kind) << 24) | ((vlen) & BTF_MAX_VLEN))
#define BTF_TYPE_ENC(name, info, size_or_type) (name), (info), (size_or_type)
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] libbpf: Provide GELF_ST_VISIBILITY() define for older libelf
2021-05-08 15:22 [PATCH 1/1] libbpf: Provide GELF_ST_VISIBILITY() define for older libelf Arnaldo Carvalho de Melo
@ 2021-05-11 21:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-11 21:20 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: andrii, ast, jolsa, davem, bpf
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
On Sat, 8 May 2021 12:22:12 -0300 you wrote:
> Where that macro isn't available.
>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Andrii Nakryiko <andrii@kernel.org>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> [...]
Here is the summary with links:
- [1/1] libbpf: Provide GELF_ST_VISIBILITY() define for older libelf
https://git.kernel.org/bpf/bpf/c/67e7ec0bd453
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-11 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 15:22 [PATCH 1/1] libbpf: Provide GELF_ST_VISIBILITY() define for older libelf Arnaldo Carvalho de Melo
2021-05-11 21:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).