Messages in this thread | | | From | Nick Desaulniers <> | Date | Tue, 3 May 2022 14:49:24 -0700 | Subject | Re: [PATCH v2 06/26] modpost: traverse unresolved symbols in order |
| |
On Sun, May 1, 2022 at 1:42 AM Masahiro Yamada <masahiroy@kernel.org> wrote: > > Currently, modpost manages unresolved in a singly linked list; it adds > a new node to the head, and traverses the list from new to old. > > Use a doubly linked list to keep the order in the symbol table in the > ELF file. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > > (no changes since v1)
Technically, you added a comment. :P https://lore.kernel.org/linux-kbuild/20220424190811.1678416-11-masahiroy@kernel.org/
> > scripts/mod/modpost.c | 20 ++++++++++++++------ > scripts/mod/modpost.h | 2 +- > 2 files changed, 15 insertions(+), 7 deletions(-) > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index abcdb0677775..c7dda4cfa497 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -185,6 +185,8 @@ static struct module *new_module(const char *modname) > mod = NOFAIL(malloc(sizeof(*mod) + strlen(modname) + 1)); > memset(mod, 0, sizeof(*mod)); > > + INIT_LIST_HEAD(&mod->unresolved_symbols); > + > strcpy(mod->name, modname); > mod->is_vmlinux = (strcmp(modname, "vmlinux") == 0); > > @@ -207,6 +209,7 @@ static struct module *new_module(const char *modname) > > struct symbol { > struct symbol *next; > + struct list_head list; /* link to module::unresolved_symbols */
Thanks. ;) Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
-- Thanks, ~Nick Desaulniers
| |