[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <hka6ukulmkmxp7mrcmxmllco2sqof2elextc7ggcikazfzmwni@a4pnogedcr7r>
Date: Fri, 21 Nov 2025 10:42:47 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Tiezhu Yang <yangtiezhu@...ngson.cn>, Ard Biesheuvel <ardb@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>, linux-kbuild@...r.kernel.org, linux-efi@...r.kernel.org,
loongarch@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] kbuild: Add KBUILD_VMLINUX_LIBS_PRELINK
On Fri, Nov 21, 2025 at 12:01:40AM -0700, Nathan Chancellor wrote:
> > @@ -1199,6 +1199,7 @@ KBUILD_VMLINUX_OBJS := built-in.a $(patsubst %/, %/lib.a, $(filter %/, $(libs-y)
> > KBUILD_VMLINUX_LIBS := $(filter-out %/, $(libs-y))
> >
> > export KBUILD_VMLINUX_LIBS
> > +export KBUILD_VMLINUX_LIBS_PRELINK
>
> This variable name is a little confusing to me since they do get added
> to vmlinux during linking, not before. I am not sure of a better one
> though, maybe KBUILD_VMLINUX_LIBS_FINAL?
I think that name was my idea. Not sure what I was thinking, I guess
"prelink" was somehow meant to imply after the vmlinux.o whole-archive
link but before the "final" link.
"final" is indeed better.
> It may also make sense to
> introduce similar syntax to the existing libs-y syntax, maybe
>
> final-libs-y
>
> or something like that?
Yeah, I suppose that would mirror how KBUILD_VMLINUX_LIBS is wired up.
> Also, since these objects are no longer in KBUILD_VMLINUX_LIBS, does
> this new variable need to be added to any of the other places in the
> build system that use KBUILD_VMLINUX_LIBS for things such as build
> dependencies?
Not sure about that one. drivers/firmware/efi/libstub/lib.a is getting
built regardless so there must already be an implicit dependency?
--
Josh
Powered by blists - more mailing lists