Skip to content

kbuild: build speed improvement of CONFIG_TRIM_UNUSED_KSYMS

Masahiro Yamada linux-arch linux-kbuild lkml oe-kbuild-all 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/24 patches 6 repliesIn review
  2. v2 posting 1/21 patch 4 repliesSuperseded
  3. v14 patches 10 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4export.h: make __ksymtab_strings per-symbol sectioninclude/asm-generic/export.h include/asm-generic/vmlinux.lds.h include/linux/export.h+3 -30 replies
2/4kbuild: separate out vmlinux.lds generationMakefile arch/alpha/kernel/Makefile arch/arc/kernel/Makefile +22 more+46 -250 replies
3/4kbuild: re-implement CONFIG_TRIM_UNUSED_KSYMS to make it work in one-passMakefile arch/arm64/kvm/hyp/nvhe/hyp.lds.S arch/powerpc/kernel/vdso32/vdso32.lds.S +12 more+105 -2115 replies
4/4kbuild: remove guarding from TRIM_UNUSED_KSYMSinit/Kconfig+1 -21 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchNicolas Pitre
1/4
2/4
3/4A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] kbuild: build speed improvement of CONFIG_TRIM_UNUSED_KSYMS

Now CONFIG_TRIM_UNUSED_KSYMS is revived, but Linus is still unhappy about the build speed.

I re-implemented this feature, and the build time cost is now almost unnoticeable level.

(no changes since v1)

Masahiro Yamada (4):
export.h: make __ksymtab_strings per-symbol section
kbuild: separate out vmlinux.lds generation
kbuild: re-implement CONFIG_TRIM_UNUSED_KSYMS to make it work in
one-pass
kbuild: remove guarding from TRIM_UNUSED_KSYMS

 Makefile                                      | 34 ++++-----
 arch/alpha/kernel/Makefile                    |  3 +-
 arch/arc/kernel/Makefile                      |  3 +-
 arch/arm/kernel/Makefile                      |  3 +-
 arch/arm64/kernel/Makefile                    |  3 +-
 arch/arm64/kvm/hyp/nvhe/hyp.lds.S             |  1 +
 arch/csky/kernel/Makefile                     |  3 +-
 arch/h8300/kernel/Makefile                    |  2 +-
 arch/hexagon/kernel/Makefile                  |  3 +-
 arch/ia64/kernel/Makefile                     |  3 +-
 arch/m68k/kernel/Makefile                     |  2 +-
 arch/microblaze/kernel/Makefile               |  3 +-
 arch/mips/kernel/Makefile                     |  3 +-
 arch/nds32/kernel/Makefile                    |  3 +-
 arch/nios2/kernel/Makefile                    |  2 +-
 arch/openrisc/kernel/Makefile                 |  3 +-
 arch/parisc/kernel/Makefile                   |  3 +-
 arch/powerpc/kernel/Makefile                  |  2 +-
 arch/powerpc/kernel/vdso32/vdso32.lds.S       |  1 +
 arch/powerpc/kernel/vdso64/vdso64.lds.S       |  1 +
 arch/riscv/kernel/Makefile                    |  2 +-
 arch/s390/kernel/Makefile                     |  3 +-
 arch/s390/purgatory/purgatory.lds.S           |  1 +
 arch/sh/kernel/Makefile                       |  3 +-
 arch/sparc/kernel/Makefile                    |  2 +-
 arch/um/kernel/Makefile                       |  2 +-
 arch/x86/kernel/Makefile                      |  2 +-
 arch/xtensa/kernel/Makefile                   |  3 +-
 include/asm-generic/export.h                  | 25 +------
 include/asm-generic/vmlinux.lds.h             | 13 ++--
 include/linux/export.h                        | 56 ++++----------
 include/linux/ksyms.lds.h                     | 22 ++++++
 init/Kconfig                                  |  3 +-
 scripts/Makefile.build                        |  7 +-
 scripts/Makefile.lib                          |  1 +
 scripts/adjust_autoksyms.sh                   | 73 -------------------
 .../{gen_autoksyms.sh => gen-keep-ksyms.sh}   | 43 ++++++++---
 scripts/gen_ksymdeps.sh                       | 25 -------
 scripts/module.lds.S                          | 23 +++---
 39 files changed, 152 insertions(+), 238 deletions(-)
 create mode 100644 include/linux/ksyms.lds.h
 delete mode 100755 scripts/adjust_autoksyms.sh
 rename scripts/{gen_autoksyms.sh => gen-keep-ksyms.sh} (66%)
 delete mode 100755 scripts/gen_ksymdeps.sh
Signature · 1 line
2.27.0