summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-03 04:54:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-03 11:28:25 -0500
commit56067812d5b0e737ac2063e94a50f76b810d6ca3 (patch)
tree1627e6abc9001f0b519ed65daa86be46d52c4117 /init
parent34e00accf612bc5448ae709245c2b408edf39f46 (diff)
kbuild: modversions: add infrastructure for emitting relative CRCs
This add the kbuild infrastructure that will allow architectures to emit vmlinux symbol CRCs as 32-bit offsets to another location in the kernel where the actual value is stored. This works around problems with CRCs being mistaken for relocatable symbols on kernels that self relocate at runtime (i.e., powerpc with CONFIG_RELOCATABLE=y) For the kbuild side of things, this comes down to the following: - introducing a Kconfig symbol MODULE_REL_CRCS - adding a -R switch to genksyms to instruct it to emit the CRC symbols as references into the .rodata section - making modpost distinguish such references from absolute CRC symbols by the section index (SHN_ABS) - making kallsyms disregard non-absolute symbols with a __crc_ prefix Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig4
1 files changed, 4 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index e1a937348a3e..4dd8bd232a1d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1987,6 +1987,10 @@ config MODVERSIONS
1987 make them incompatible with the kernel you are running. If 1987 make them incompatible with the kernel you are running. If
1988 unsure, say N. 1988 unsure, say N.
1989 1989
1990config MODULE_REL_CRCS
1991 bool
1992 depends on MODVERSIONS
1993
1990config MODULE_SRCVERSION_ALL 1994config MODULE_SRCVERSION_ALL
1991 bool "Source checksum for all modules" 1995 bool "Source checksum for all modules"
1992 help 1996 help