* [PATCH] fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
@ 2022-05-22 16:01 Masahiro Yamada
2022-05-22 22:35 ` Sedat Dilek
2022-05-23 21:04 ` Nick Desaulniers
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2022-05-22 16:01 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Nathan Chancellor, Nick Desaulniers,
Nicolas Schier, Peter Zijlstra, linux-modules, llvm,
Ard Biesheuvel, Sami Tolvanen, Sedat Dilek, Masahiro Yamada
I will squash this into
https://patchwork.kernel.org/project/linux-kbuild/patch/20220513113930.10488-3-masahiroy@kernel.org/
Sedat Reported an error:
https://lore.kernel.org/linux-kbuild/CA+icZUWttwjhDNPO1VuVyiMoReH5e83nsYDd0rEoY8-Uwv6pHw@mail.gmail.com/T/#md82f561e348b7959b7270c33ac86fa3edb0d773a
__used is needed to make the combination of
CONFIG_MODVERSIONS and CONFIG_LTO_CLANG working.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
include/linux/export-internal.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h
index 77175d561058..c2b1d4fd5987 100644
--- a/include/linux/export-internal.h
+++ b/include/linux/export-internal.h
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
2022-05-22 16:01 [PATCH] fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS Masahiro Yamada
@ 2022-05-22 22:35 ` Sedat Dilek
2022-05-23 21:04 ` Nick Desaulniers
1 sibling, 0 replies; 3+ messages in thread
From: Sedat Dilek @ 2022-05-22 22:35 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, linux-kernel, Nathan Chancellor, Nick Desaulniers,
Nicolas Schier, Peter Zijlstra, linux-modules, llvm,
Ard Biesheuvel, Sami Tolvanen
On Sun, May 22, 2022 at 6:03 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> I will squash this into
>
> https://patchwork.kernel.org/project/linux-kbuild/patch/20220513113930.10488-3-masahiroy@kernel.org/
>
> Sedat Reported an error:
>
> https://lore.kernel.org/linux-kbuild/CA+icZUWttwjhDNPO1VuVyiMoReH5e83nsYDd0rEoY8-Uwv6pHw@mail.gmail.com/T/#md82f561e348b7959b7270c33ac86fa3edb0d773a
>
> __used is needed to make the combination of
> CONFIG_MODVERSIONS and CONFIG_LTO_CLANG working.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
I was able to build and boot on bare metal.
Feel free to add my...
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
-Sedat-
> ---
>
> include/linux/export-internal.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h
> index 77175d561058..c2b1d4fd5987 100644
> --- a/include/linux/export-internal.h
> +++ b/include/linux/export-internal.h
> @@ -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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
2022-05-22 16:01 [PATCH] fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS Masahiro Yamada
2022-05-22 22:35 ` Sedat Dilek
@ 2022-05-23 21:04 ` Nick Desaulniers
1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2022-05-23 21:04 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, linux-kernel, Nathan Chancellor, Nicolas Schier,
Peter Zijlstra, linux-modules, llvm, Ard Biesheuvel,
Sami Tolvanen, Sedat Dilek
On Sun, May 22, 2022 at 9:04 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> I will squash this into
>
> https://patchwork.kernel.org/project/linux-kbuild/patch/20220513113930.10488-3-masahiroy@kernel.org/
>
> Sedat Reported an error:
>
> https://lore.kernel.org/linux-kbuild/CA+icZUWttwjhDNPO1VuVyiMoReH5e83nsYDd0rEoY8-Uwv6pHw@mail.gmail.com/T/#md82f561e348b7959b7270c33ac86fa3edb0d773a
>
> __used is needed to make the combination of
> CONFIG_MODVERSIONS and CONFIG_LTO_CLANG working.
Yep, vaguely reminiscent of
commit f3751ad0116f ("tracepoint: Mark __tracepoint_string's __used")
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> include/linux/export-internal.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h
> index 77175d561058..c2b1d4fd5987 100644
> --- a/include/linux/export-internal.h
> +++ b/include/linux/export-internal.h
> @@ -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
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-23 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 16:01 [PATCH] fixup! kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS Masahiro Yamada
2022-05-22 22:35 ` Sedat Dilek
2022-05-23 21:04 ` Nick Desaulniers
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.