Skip to contentSkip to conversation

exporth-fix-section-name-for-config_trim_unused_ksyms-for-clang.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 14, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

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 <[email protected]>
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.

Fixes commit bbda5ec671d3 ("kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS")
Cc Nathan Chancellor <[email protected]>
Cc Masahiro Yamada <[email protected]>
Cc Matthias Maennich <[email protected]>
Cc Jessica Yu <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Will Deacon <[email protected]>

---

 include/linux/export.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/export.h renamed from include/linux/export.h~exporth-fix-section-name-for-config_trim_unused_ksyms-for-clang +1 -1
@@ -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 [email protected] are