linux/arch/powerpc
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
..
boot kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
configs arch: Remove references to CONFIG_NFSD_V3 in the default configs 2022-03-11 10:25:16 -05:00
crypto powerpc updates for 5.17 2022-01-14 15:17:26 +01:00
include Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
kernel Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
kexec powerpc: Move C prototypes out of asm-prototypes.h 2022-03-08 22:06:25 +11:00
kvm powerpc updates for 5.18 2022-03-25 09:39:36 -07:00
lib powerpc updates for 5.18 2022-03-25 09:39:36 -07:00
math-emu powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
mm Merge branch 'akpm' (patches from Andrew) 2022-03-25 10:21:20 -07:00
net powerpc updates for 5.18 2022-03-25 09:39:36 -07:00
perf powerpc: declare unmodified attribute_group usages const 2022-03-08 22:15:32 +11:00
platforms libnvdimm for 5.18 2022-03-30 10:04:11 -07:00
purgatory
sysdev pci-v5.18-changes 2022-03-25 13:02:05 -07:00
tools powerpc/64: Add UADDR64 relocation support 2022-03-09 21:47:53 +11:00
xmon powerpc/xmon: Dump XIVE information for online-only processors. 2022-01-06 21:47:00 +11:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS 2022-05-24 16:33:20 +09:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
Makefile.postlink