lkml.org 
[lkml]   [2022]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [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

    \
     
     \ /
      Last update: 2022-05-03 23:53    [W:4.055 / U:0.400 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site