linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/20] Unify <linux/export.h> and <asm/export.h>, remove EXPORT_DATA_SYMBOL(), faster TRIM_UNUSED_KSYMS
@ 2023-05-21 16:04 Masahiro Yamada
  2023-05-21 16:04 ` [PATCH v6 01/20] Revert "modpost: skip ELF local symbols during section mismatch check" Masahiro Yamada
                   ` (20 more replies)
  0 siblings, 21 replies; 51+ messages in thread
From: Masahiro Yamada @ 2023-05-21 16:04 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Nathan Chancellor, Nick Desaulniers,
	Nicolas Schier, Masahiro Yamada


This patch set refactors modpost first to make it easier to
add new code.

My goals:

 - Refactors EXPORT_SYMBOL, <linux/export.h> and <asm/export.h>.
   You can still put EXPORT_SYMBOL() in *.S file, very close to the definition,
   but you do not need to care about whether it is a function or a data.
   This removes EXPORT_DATA_SYMBOL().

 - Re-implement TRIM_UNUSED_KSYMS in one-pass.
   This makes the building faster.

 - Move the static EXPORT_SYMBOL check to modpost.
   This also makes the building faster.

This patch set is applicable to
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild

Previous version
v5: https://lore.kernel.org/linux-kbuild/CAK7LNARBiOywrMLbR=9N35sk19U0QM3xcPy7d1WqV-eyb4W23w@mail.gmail.com/T/#t
v4: https://lore.kernel.org/linux-kbuild/CAK7LNASDzy9RERN6+q6WgR4ROYZQue=SBqgbcoYuVePByHtk6Q@mail.gmail.com/T/#t
v3: https://lore.kernel.org/all/20220928063947.299333-1-masahiroy@kernel.org/


Masahiro Yamada (20):
  Revert "modpost: skip ELF local symbols during section mismatch check"
  modpost: fix section mismatch message for R_ARM_ABS32
  modpost: detect section mismatch for R_ARM_MOVW_ABS_NC and
    R_ARM_MOVT_ABS
  modpost: remove unused argument from secref_whitelist()
  modpost: refactor find_fromsym() and find_tosym()
  modpost: unify 'sym' and 'to' in default_mismatch_handler()
  modpost: replace r->r_offset, r->r_addend with faddr, taddr
  modpost: remove is_shndx_special() check from section_rel(a)
  modpost: pass struct module pointer to check_section_mismatch()
  kbuild: generate KSYMTAB entries by modpost
  ia64,export.h: replace EXPORT_DATA_SYMBOL* with EXPORT_SYMBOL*
  modpost: check static EXPORT_SYMBOL* by modpost again
  modpost: squash sym_update_namespace() into sym_add_exported()
  modpost: use null string instead of NULL pointer for default namespace
  kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
  modpost: merge fromsec=DATA_SECTIONS entries in sectioncheck table
  modpost: merge bad_tosec=ALL_EXIT_SECTIONS entries in sectioncheck
    table
  modpost: remove *_sections[] arrays
  modpost: merge two similar section mismatch warnings
  modpost: show offset from symbol for section mismatch warnings

 .gitignore                        |   1 -
 Makefile                          |  19 +-
 arch/ia64/include/asm/Kbuild      |   1 +
 arch/ia64/include/asm/export.h    |   3 -
 arch/ia64/kernel/head.S           |   2 +-
 arch/ia64/kernel/ivt.S            |   2 +-
 arch/um/os-Linux/user_syms.c      |   9 +-
 include/asm-generic/export.h      |  83 +-----
 include/asm-generic/vmlinux.lds.h |   1 +
 include/linux/export-internal.h   |  49 ++++
 include/linux/export.h            | 119 ++------
 include/linux/pm.h                |   8 +-
 kernel/module/internal.h          |  12 +
 scripts/Makefile.build            |  19 +-
 scripts/Makefile.modpost          |   7 +
 scripts/adjust_autoksyms.sh       |  73 -----
 scripts/basic/fixdep.c            |   3 +-
 scripts/check-local-export        |  70 -----
 scripts/gen_ksymdeps.sh           |  30 --
 scripts/mod/modpost.c             | 454 +++++++++++++++---------------
 scripts/mod/modpost.h             |   6 +-
 scripts/remove-stale-files        |   2 +
 22 files changed, 345 insertions(+), 628 deletions(-)
 delete mode 100644 arch/ia64/include/asm/export.h
 delete mode 100755 scripts/adjust_autoksyms.sh
 delete mode 100755 scripts/check-local-export
 delete mode 100755 scripts/gen_ksymdeps.sh

-- 
2.39.2


^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2023-06-02 13:52 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-21 16:04 [PATCH v6 00/20] Unify <linux/export.h> and <asm/export.h>, remove EXPORT_DATA_SYMBOL(), faster TRIM_UNUSED_KSYMS Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 01/20] Revert "modpost: skip ELF local symbols during section mismatch check" Masahiro Yamada
2023-05-22 17:42   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 02/20] modpost: fix section mismatch message for R_ARM_ABS32 Masahiro Yamada
2023-05-22 17:56   ` Nick Desaulniers
2023-05-22 21:35     ` Ard Biesheuvel
2023-05-23  5:07       ` Masahiro Yamada
2023-05-23  7:13         ` Ard Biesheuvel
2023-05-21 16:04 ` [PATCH v6 03/20] modpost: detect section mismatch for R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS Masahiro Yamada
2023-05-22 18:03   ` Nick Desaulniers
2023-05-22 21:50     ` Ard Biesheuvel
2023-05-23 11:58       ` Masahiro Yamada
2023-05-23 12:20         ` Ard Biesheuvel
2023-05-24  0:02           ` Masahiro Yamada
2023-05-24  0:04     ` Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 04/20] modpost: remove unused argument from secref_whitelist() Masahiro Yamada
2023-05-22 18:10   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 05/20] modpost: refactor find_fromsym() and find_tosym() Masahiro Yamada
2023-05-22 18:18   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 06/20] modpost: unify 'sym' and 'to' in default_mismatch_handler() Masahiro Yamada
2023-05-22 18:23   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 07/20] modpost: replace r->r_offset, r->r_addend with faddr, taddr Masahiro Yamada
2023-05-22 18:31   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 08/20] modpost: remove is_shndx_special() check from section_rel(a) Masahiro Yamada
2023-05-25 17:20   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 09/20] modpost: pass struct module pointer to check_section_mismatch() Masahiro Yamada
2023-05-25 17:23   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 10/20] kbuild: generate KSYMTAB entries by modpost Masahiro Yamada
2023-05-25 17:50   ` Nick Desaulniers
2023-06-02 13:51     ` Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 11/20] ia64,export.h: replace EXPORT_DATA_SYMBOL* with EXPORT_SYMBOL* Masahiro Yamada
2023-05-25 17:52   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 12/20] modpost: check static EXPORT_SYMBOL* by modpost again Masahiro Yamada
2023-05-25 18:18   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 13/20] modpost: squash sym_update_namespace() into sym_add_exported() Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 14/20] modpost: use null string instead of NULL pointer for default namespace Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 15/20] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion Masahiro Yamada
2023-05-25 18:14   ` Nick Desaulniers
2023-05-28  7:40     ` Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 16/20] modpost: merge fromsec=DATA_SECTIONS entries in sectioncheck table Masahiro Yamada
2023-05-25 18:30   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 17/20] modpost: merge bad_tosec=ALL_EXIT_SECTIONS " Masahiro Yamada
2023-05-25 18:36   ` Nick Desaulniers
2023-05-28 16:43     ` Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 18/20] modpost: remove *_sections[] arrays Masahiro Yamada
2023-05-21 16:04 ` [PATCH v6 19/20] modpost: merge two similar section mismatch warnings Masahiro Yamada
2023-05-25 18:20   ` Nick Desaulniers
2023-05-21 16:04 ` [PATCH v6 20/20] modpost: show offset from symbol for " Masahiro Yamada
2023-05-25 18:26   ` Nick Desaulniers
2023-05-28  7:29     ` Masahiro Yamada
2023-05-22  1:47 ` [PATCH v6 00/20] Unify <linux/export.h> and <asm/export.h>, remove EXPORT_DATA_SYMBOL(), faster TRIM_UNUSED_KSYMS Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).