Message ID | 20220916062953.2972556-1-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | linux/export: use inline assembler to populate symbol CRCs | expand |
diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h index c2b1d4fd5987..fb90f326b1b5 100644 --- a/include/linux/export-internal.h +++ b/include/linux/export-internal.h @@ -12,6 +12,9 @@ /* __used is needed to keep __crc_* for LTO */ #define SYMBOL_CRC(sym, crc, sec) \ - u32 __section("___kcrctab" sec "+" #sym) __used __crc_##sym = crc + asm(".section \"___kcrctab" sec "+" #sym "\",\"a\"" "\n" \ + "__crc_" #sym ":" "\n" \ + ".long " #crc "\n" \ + ".previous" "\n") #endif /* __LINUX_EXPORT_INTERNAL_H__ */