提交 046e849a 编写于 作者: A Arnaldo Carvalho de Melo 提交者: Zheng Zengkai

libbpf: Provide GELF_ST_VISIBILITY() define for older libelf

mainline inclusion
from mainline-5.13-rc4
commit 67e7ec0b
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=67e7ec0bd4535fc6e6d3f5d174f80e10a8a80c6e

-------------------------------------------------

Where that macro isn't available.
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/YJaspEh0qZr4LYOc@kernel.org
(cherry picked from commit 67e7ec0b)
Signed-off-by: NWang Yufen <wangyufen@huawei.com>
上级 faf399eb
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册