Re: [PATCH v5 21/21] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion

Sami Tolvanen
2023-05-16T14:52:11Z

On Mon, May 15, 2023 at 7:16 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Tue, May 16, 2023 at 7:54 AM Sami Tolvanen <samitolvanen@google.com> wrote:
> > A while ago there
> > was a suggestion of adding an option to LLD that allows one to pass a
> > list of symbols to preserve in relocatable LTO links, which would
> > allow us to better optimize vmlinux.o. However, I haven't had a chance
> > to look into this deeper than this proof of concept:
> >
> > https://reviews.llvm.org/D142163
>
>
> Interesting.
>
> But, scripts/generate_initcall_order.pl is still needed, right?
>
> --lto-export-symbol-list is a list of symbols,
> but it does not specify the correct order?

Correct, the patch doesn't take the order of the list into account.

Sami