Skip to content

Commit 8ab2ae6

Browse files
arndbtorvalds
authored andcommitted
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>
1 parent 4db5e63 commit 8ab2ae6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

include/asm-generic/export.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ KSYM(__kstrtab_\name):
5454
KSYM(__kcrctab_\name):
5555
__put KSYM(__crc_\name)
5656
.weak KSYM(__crc_\name)
57+
.set KSYM(__crc_\name), 0
5758
.previous
5859
#endif
5960
#endif

0 commit comments

Comments
 (0)