summaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-12-02 13:40:27 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-02 08:51:22 -0800
commit8ab2ae655bfe384335c5b6b0d6041e0ddce26b00 (patch)
tree1c4f421eea4bfe6473cf22df5e47e7ab9388892a /include/asm-generic
parent4db5e636ddca41f4292359fdb3ac7cc4346a359a (diff)
downloadop-kernel-dev-8ab2ae655bfe384335c5b6b0d6041e0ddce26b00.zip
op-kernel-dev-8ab2ae655bfe384335c5b6b0d6041e0ddce26b00.tar.gz
default exported asm symbols to zero
With binutils-2.26 and before, a weak missing symbol was kept during the final link, and a missing CRC for an export would lead to that CRC being treated as zero implicitly. With binutils-2.27, the crc symbol gets dropped, and any module trying to use it will fail to load. This sets the weak CRC symbol to zero explicitly, making it defined in vmlinux, which in turn lets us load the modules referring to that CRC. The comment above the __CRC_SYMBOL macro suggests that this was always the intention, although it also seems that all symbols defined in C have a correct CRC these days, and only the exports that are now done in assembly need this. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Adam Borowski <kilobyte@angband.pl> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/export.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h
index 63554e9..59a3b2f5 100644
--- a/include/asm-generic/export.h
+++ b/include/asm-generic/export.h
@@ -54,6 +54,7 @@ KSYM(__kstrtab_\name):
KSYM(__kcrctab_\name):
__put KSYM(__crc_\name)
.weak KSYM(__crc_\name)
+ .set KSYM(__crc_\name), 0
.previous
#endif
#endif
OpenPOWER on IntegriCloud