mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
bpf: Avoid __hidden__ attribute in static object
An object defined as `static' defaults to hidden visibility. If additionally the visibility(__weak__) compiler attribute is applied to the declaration of the object, GCC warns that the attribute gets ignored. This patch removes the only instance of this problem among the BPF selftests. Tested in bpf-next master. Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/bpf/20240507074227.4523-2-jose.marchesi@oracle.com
This commit is contained in:
parent
75b0fbf15d
commit
2ce987e165
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
int err;
|
||||
|
||||
#define private(name) SEC(".bss." #name) __hidden __attribute__((aligned(8)))
|
||||
#define private(name) SEC(".bss." #name) __attribute__((aligned(8)))
|
||||
private(MASK) static struct bpf_cpumask __kptr * global_mask;
|
||||
|
||||
struct __cpumask_map_value {
|
||||
|
|
Loading…
Add table
Reference in a new issue