On Thu, Aug 24, 2023 at 10:05 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote: > > Revert the following two commits: > > - 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when CONFIG_MODULES=y") > - 7f2084fa55e6 ("[kbuild] handle exports in lib-y objects reliably") > > Now, lib-y is back to static library again, and the link order is > consistent w/wo CONFIG_MODULES. > > Since commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by > modpost"), .vmlinux.export.c contains references to exported symbols. > If a symbol in a lib-y object is exported, that object is always linked > even without any explicit user in vmlinux. > > Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> > --- I just recalled that presumably ARM code must be fixed beforehand. https://lore.kernel.org/lkml/20230619143725.57967-1-masahiroy@xxxxxxxxxx/ $(mmu-y) is added to lib-y, but they cannot go into a static library. -- Best Regards Masahiro Yamada