Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

module: unify absolute krctab definitions for 32-bit and 64-bit

The previous patch introduced a separate inline asm version of the
krcrctab declaration template for use with 64-bit architectures, which
cannot refer to ELF symbols using 32-bit quantities.

This declaration should be equivalent to the C one for 32-bit
architectures, but just in case - unify them in a separate patch, which
can simply be dropped if it turns out to break anything.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ard Biesheuvel and committed by
Linus Torvalds
4b9eee96 71810db2

-7
-7
include/linux/export.h
··· 49 49 " .weak " VMLINUX_SYMBOL_STR(__crc_##sym) " \n" \ 50 50 " .long " VMLINUX_SYMBOL_STR(__crc_##sym) " - . \n" \ 51 51 " .previous \n"); 52 - #elif !defined(CONFIG_64BIT) 53 - #define __CRC_SYMBOL(sym, sec) \ 54 - extern __visible void *__crc_##sym __attribute__((weak)); \ 55 - static const unsigned long __kcrctab_##sym \ 56 - __used \ 57 - __attribute__((section("___kcrctab" sec "+" #sym), used)) \ 58 - = (unsigned long) &__crc_##sym; 59 52 #else 60 53 #define __CRC_SYMBOL(sym, sec) \ 61 54 asm(" .section \"___kcrctab" sec "+" #sym "\", \"a\" \n" \