FROMGIT: kbuild: Add gendwarfksyms as an alternative to genksyms

When MODVERSIONS is enabled, allow selecting gendwarfksyms as the
implementation, but default to genksyms.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
(cherry picked from commit 9c3681f9b9fd12cdbc4a542df599f1837512f3d5
 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild)
Bug: 347787665
Signed-off-by: Matthew Maurer <mmaurer@google.com>

Change-Id: Id6279538db7fc1616dc6a1a4b980df271e8df087
Signed-off-by: Matthew Maurer <mmaurer@google.com>
This commit is contained in:
Sami Tolvanen
2025-01-03 20:45:39 +00:00
committed by Giuliano Procida
parent bbbb64a40f
commit 1e7815837f
3 changed files with 52 additions and 7 deletions
+22
View File
@@ -169,6 +169,22 @@ config MODVERSIONS
make them incompatible with the kernel you are running. If
unsure, say N.
choice
prompt "Module versioning implementation"
depends on MODVERSIONS
help
Select the tool used to calculate symbol versions for modules.
If unsure, select GENKSYMS.
config GENKSYMS
bool "genksyms (from source code)"
help
Calculate symbol versions from pre-processed source code using
genksyms.
If unsure, say Y.
config GENDWARFKSYMS
bool "gendwarfksyms (from debugging information)"
depends on DEBUG_INFO
@@ -176,6 +192,12 @@ config GENDWARFKSYMS
depends on !DEBUG_INFO_REDUCED && !DEBUG_INFO_SPLIT
# Requires ELF object files.
depends on !LTO
help
Calculate symbol versions from DWARF debugging information using
gendwarfksyms. Requires DEBUG_INFO to be enabled.
If unsure, say N.
endchoice
config ASM_MODVERSIONS
bool