1. 07 May, 2022 2 commits
    • Masahiro Yamada's avatar
      modpost: move export_from_secname() call to more relevant place · 535b3e05
      Masahiro Yamada authored
      The assigned 'export' is only used when
      
          if (strstarts(symname, "__ksymtab_"))
      
      is met. The else-part of the assignment is the dead code.
      
      Move the export_from_secname() call to where it is used.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      535b3e05
    • Masahiro Yamada's avatar
      modpost: remove useless export_from_sec() · 7ce3e410
      Masahiro Yamada authored
      With commit 1743694e ("modpost: stop symbol preloading for
      modversion CRC") applied, now export_from_sec() is useless.
      
      handle_symbol() is called for every symbol in the ELF.
      
      When 'symname' does not start with "__ksymtab", export_from_sec() is
      called, and the returned value is stored in 'export'.
      
      It is used in the last part of handle_symbol():
      
          if (strstarts(symname, "__ksymtab_")) {
                  name = symname + strlen("__ksymtab_");
                  sym_add_exported(name, mod, export);
          }
      
      'export' is used only when 'symname' starts with "__ksymtab_".
      
      So, the value returned by export_from_sec() is never used.
      
      Remove useless export_from_sec(). This makes further cleanups possible.
      
      I put the temporary code:
      
          export = export_unknown;
      
      Otherwise, I would get the compiler warning:
      
          warning: 'export' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      This is apparently false positive because
      
          if (strstarts(symname, "__ksymtab_")
      
      ... is a stronger condition than:
      
          if (strstarts(symname, "__ksymtab")
      
      Anyway, this part will be cleaned up by the next commit.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      7ce3e410
  2. 06 Apr, 2022 3 commits
  3. 05 Apr, 2022 2 commits
  4. 03 Apr, 2022 8 commits
  5. 02 Apr, 2022 25 commits