Files
lkl_linux/include/linux
Masahiro Yamada 7b4537199a kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
include/{linux,asm-generic}/export.h defines a weak symbol, __crc_*
as a placeholder.

Genksyms writes the version CRCs into the linker script, which will be
used for filling the __crc_* symbols. The linker script format depends
on CONFIG_MODULE_REL_CRCS. If it is enabled, __crc_* holds the offset
to the reference of CRC.

It is time to get rid of this complexity.

Now that modpost parses text files (.*.cmd) to collect all the CRCs,
it can generate C code that will be linked to the vmlinux or modules.

Generate a new C file, .vmlinux.export.c, which contains the CRCs of
symbols exported by vmlinux. It is compiled and linked to vmlinux in
scripts/link-vmlinux.sh.

Put the CRCs of symbols exported by modules into the existing *.mod.c
files. No additional build step is needed for modules. As before,
*.mod.c are compiled and linked to *.ko in scripts/Makefile.modfinal.

No linker magic is used here. The new C implementation works in the
same way, whether CONFIG_RELOCATABLE is enabled or not.
CONFIG_MODULE_REL_CRCS is no longer needed.

Previously, Kbuild invoked additional $(LD) to update the CRCs in
objects, but this step is unneeded too.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
2022-05-24 16:33:20 +09:00
..
2022-02-27 13:38:10 +00:00
2022-03-23 19:58:38 +01:00
2022-02-01 14:25:50 +02:00
2022-01-22 08:33:34 +02:00
2022-01-15 08:47:31 -08:00
2022-03-08 19:39:38 -07:00
2022-03-17 20:17:18 -07:00
2022-03-11 19:15:03 -08:00
2022-03-15 10:32:44 +01:00
2022-02-07 16:35:35 -08:00
2022-02-07 16:35:35 -08:00
2022-03-16 15:13:36 -07:00
2022-01-15 08:47:31 -08:00
2022-02-13 16:50:07 -08:00
2022-04-01 14:40:44 -04:00
2022-01-20 08:52:54 +02:00
2022-03-02 22:44:49 -08:00
2022-02-28 23:26:27 -08:00
2022-03-15 08:23:29 -04:00
2022-02-28 13:25:49 +01:00
2022-02-19 19:23:53 -08:00
2022-02-14 15:43:15 +01:00
2022-02-05 15:20:34 +00:00
2022-03-18 09:47:04 +01:00
2022-01-27 13:53:26 +00:00
2022-03-21 12:57:38 -04:00
2022-04-01 14:40:44 -04:00
2022-02-09 09:24:40 -05:00
2022-02-28 13:45:04 +02:00
2022-03-24 19:06:45 -07:00
2022-04-01 13:45:08 -04:00
2022-02-02 07:49:59 -07:00
2022-02-09 08:04:44 +01:00
2022-02-09 08:04:44 +01:00
2022-01-22 08:33:37 +02:00
2022-01-24 14:45:02 +01:00
2022-03-08 14:33:36 -06:00
2022-03-17 20:16:29 -07:00
2022-03-23 19:58:41 +01:00
2022-02-24 15:04:51 +00:00
2022-02-25 09:36:06 +01:00
2022-03-07 12:48:35 -07:00
2022-02-16 07:49:41 +01:00
2022-03-22 15:57:11 -07:00
2022-01-26 14:54:48 +01:00
2022-01-27 13:53:27 +00:00
2022-03-28 16:53:00 -04:00