* [merged] exporth-fix-section-name-for-config_trim_unused_ksyms-for-clang.patch removed from -mm tree
@ 2020-10-14 20:55 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-10-14 20:55 UTC (permalink / raw)
To: gregkh, jeyu, keescook, lkp, maennich, mm-commits,
natechancellor, ndesaulniers, will, yamada.masahiro
The patch titled
Subject: export.h: fix section name for CONFIG_TRIM_UNUSED_KSYMS for Clang
has been removed from the -mm tree. Its filename was
exporth-fix-section-name-for-config_trim_unused_ksyms-for-clang.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Nick Desaulniers <ndesaulniers@google.com>
Subject: export.h: fix section name for CONFIG_TRIM_UNUSED_KSYMS for Clang
When enabling CONFIG_TRIM_UNUSED_KSYMS, the linker will warn about the
orphan sections:
(".discard.ksym") is being placed in '".discard.ksym"'
repeatedly when linking vmlinux. This is because the stringification
operator, `#`, in the preprocessor escapes strings. GCC and Clang differ
in how they treat section names that contain \".
The portable solution is to not use a string literal with the preprocessor
stringification operator.
Link: https://bugs.llvm.org/show_bug.cgi?id=42950
Link: https://github.com/ClangBuiltLinux/linux/issues/1166
Link: https://lkml.kernel.org/r/20200929190701.398762-1-ndesaulniers@google.com
Fixes: commit bbda5ec671d3 ("kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS")
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Suggested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Matthias Maennich <maennich@google.com>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/export.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/export.h~exporth-fix-section-name-for-config_trim_unused_ksyms-for-clang
+++ a/include/linux/export.h
@@ -130,7 +130,7 @@ struct kernel_symbol {
* discarded in the final link stage.
*/
#define __ksym_marker(sym) \
- static int __ksym_marker_##sym[0] __section(".discard.ksym") __used
+ static int __ksym_marker_##sym[0] __section(.discard.ksym) __used
#define __EXPORT_SYMBOL(sym, sec, ns) \
__ksym_marker(sym); \
_
Patches currently in -mm which might be from ndesaulniers@google.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-14 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 20:55 [merged] exporth-fix-section-name-for-config_trim_unused_ksyms-for-clang.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).