fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
PATCH 1/1 fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
I will squash this into
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/
Sedat Reported an error:
__used is needed to make the combination ofCONFIG_MODVERSIONS and CONFIG_LTO_CLANG working.
---
include/linux/export-internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/export-internal.h +2 -1
@@ -10,7 +10,8 @@#include <linux/compiler.h> #include <linux/types.h> +/* __used is needed to keep __crc_* for LTO */ #define SYMBOL_CRC (sym, crc, sec) \ - u32 __section("___kcrctab" sec "+" #sym) __crc_##sym = crc + u32 __section("___kcrctab" sec "+" #sym) __used __crc_##sym = crc#endif /* __LINUX_EXPORT_INTERNAL_H__ */
Signature · 1 line
2.32.0
Quoted 5 lines · Masahiro Yamada
I will squash this into
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/
Quoted 8 lines
Sedat Reported an error:
__usedis needed to make the combination ofCONFIG_MODVERSIONSandCONFIG_LTO_CLANGworking.Signed-off-by Masahiro Yamada <[email protected]>
I was able to build and boot on bare metal.
Feel free to add my...
-Sedat-
Quoted 22 lines
---
include/linux/export-internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/linux/export-internal.h +2
-2@@ -10,7 +10,8 @@#include <linux/compiler.h> #include <linux/types.h> +/* __used is needed to keep __crc_* for LTO */ #define SYMBOL_CRC (sym, crc, sec) \ - u32 __section("___kcrctab" sec "+" #sym) __crc_##sym = crc + u32 __section("___kcrctab" sec "+" #sym) __used __crc_##sym = crc#endif /* __LINUX_EXPORT_INTERNAL_H__ */ --2.32.0
Quoted 11 lines · Masahiro Yamada
I will squash this into
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/
Sedat Reported an error:
__usedis needed to make the combination ofCONFIG_MODVERSIONSandCONFIG_LTO_CLANGworking.
Yep, vaguely reminiscent of
commit f3751ad0116f ("tracepoint: Mark __tracepoint_string's __used")
Quoted 24 lines
Signed-off-by Masahiro Yamada <[email protected]>---
include/linux/export-internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/linux/export-internal.h +2
-2@@ -10,7 +10,8 @@#include <linux/compiler.h> #include <linux/types.h> +/* __used is needed to keep __crc_* for LTO */ #define SYMBOL_CRC (sym, crc, sec) \ - u32 __section("___kcrctab" sec "+" #sym) __crc_##sym = crc + u32 __section("___kcrctab" sec "+" #sym) __used __crc_##sym = crc#endif /* __LINUX_EXPORT_INTERNAL_H__ */ --2.32.0
Signature · 2 lines
Thanks, ~Nick Desaulniers