Re: [PATCH 4/7] kbuild: split the second line of *.mod into *.usyms

From: Masahiro Yamada
Date: Thu Apr 07 2022 - 19:58:00 EST


On Fri, Apr 8, 2022 at 2:47 AM Nick Desaulniers <ndesaulniers@xxxxxxxxxx> wrote:
>
> On Wed, Apr 6, 2022 at 8:31 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> >
> > The *.mod files have two lines; the first line lists the member objects
> > of the module, and the second line, if CONFIG_TRIM_UNUSED_KSYMS=y, lists
> > the undefined symbols.
>
> Enabling EXPERT and TRIM_UNUSED_KSYMS, I didn't find any .mod files
> containing a second line that wasn't empty. Is there an example that
> has such symbol list that I can use to verify?


Modules are usually symbol consumers in order to be useful.
(and some of them are symbol providers as well).

So, it is rare to see an empty unresolved symbol list.

But, it is theoretically possible to create such a module.


This is sample code.


obj-m += foo.o

----------------(foo.c begin)----------------
#include <linux/module.h>

MODULE_LICENSE("GPL");
----------------(foo.c end)----------------






> --
> Thanks,
> ~Nick Desaulniers



--
Best Regards
Masahiro Yamada