mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
UPSTREAM: bpf: Fix build for disabled CONFIG_DEBUG_INFO_BTF option
Stephen reported following linker warnings on powerpc build: ld: warning: orphan section `.BTF_ids' from `kernel/trace/bpf_trace.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `kernel/bpf/btf.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `kernel/bpf/stackmap.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `net/core/filter.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `kernel/trace/bpf_trace.o' being placed in section `.BTF_ids' It's because we generated .BTF_ids section even when CONFIG_DEBUG_INFO_BTF is not enabled. Fixing this by generating empty btf_id arrays for this case. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Change-Id: I5b90e61d094ff88d3c76549d4b2049d79524f8e1 Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/bpf/20200714102534.299280-1-jolsa@kernel.org
This commit is contained in:
parent
385b19ee24
commit
1ccadebdd7
1 changed files with 9 additions and 0 deletions
|
|
@ -3,6 +3,8 @@
|
|||
#ifndef _LINUX_BTF_IDS_H
|
||||
#define _LINUX_BTF_IDS_H
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO_BTF
|
||||
|
||||
#include <linux/compiler.h> /* for __PASTE */
|
||||
|
||||
/*
|
||||
|
|
@ -83,6 +85,13 @@ asm( \
|
|||
".zero 4 \n" \
|
||||
".popsection; \n");
|
||||
|
||||
#else
|
||||
|
||||
#define BTF_ID_LIST(name) static u32 name[5];
|
||||
#define BTF_ID(prefix, name)
|
||||
#define BTF_ID_UNUSED
|
||||
|
||||
#endif /* CONFIG_DEBUG_INFO_BTF */
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
/* Define a list of socket types which can be the argument for
|
||||
|
|
|
|||
Loading…
Reference in a new issue