[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260105234605.GB1276749@ax162>
Date: Mon, 5 Jan 2026 16:46:05 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Ihor Solodrai <ihor.solodrai@...ux.dev>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>,
Yonghong Song <yonghong.song@...ux.dev>, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH bpf-next] scripts/gen-btf.sh: Disable LTO when generating
initial .o file
On Mon, Jan 05, 2026 at 02:01:36PM -0800, Ihor Solodrai wrote:
> Hi Nathan, thank you for the patch.
>
> I'm starting to think it wasn't a good idea to do
>
> echo "" | ${CC} ...
>
> here, given the number of associated bugs.
Yeah, I was wondering if a lack of KBUILD_CPPFLAGS would also be a
problem since that contains the endianness flag for some targets. I
cannot imagine any more issues than that but I can understand wanting to
back out of it.
> Before gen-btf.sh was introduced, the .btf.o binary was generated with this [1]:
>
> ${OBJCOPY} --only-section=.BTF --set-section-flags .BTF=alloc,readonly \
> --strip-all ${1} "${btf_data}" 2>/dev/null
>
> I changed to ${CC} on the assumption it's a quicker operation than
> stripping entire vmlinux. But maybe it's not worth it and we should
> change back to --strip-all? wdyt?
That certainly seems more robust to me. I see the logic but with
'--only-section' and no glob, I would expect that to be a rather quick
operation but I am running out of time today to test and benchmark such
a change. I will try to do it tomorrow unless someone beats me to it.
Cheers,
Nathan
Powered by blists - more mailing lists