On Tue, Jul 14, 2020 at 3:25 AM Jiri Olsa <jolsa@xxxxxxxxxx> wrote: > > 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@xxxxxxxxxxxxxxxx> > Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx> Applied both to bpf-next. Thanks for the quick fix.