The patch titled Subject: compiler.h: avoid escaped section names has been added to the -mm tree. Its filename is compilerh-avoid-escaped-section-names.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/compilerh-avoid-escaped-section-names.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/compilerh-avoid-escaped-section-names.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Subject: compiler.h: avoid escaped section names The stringification operator, `#`, in the preprocessor escapes strings. For example, `# "foo"` becomes `"\"foo\""`. 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. In this case, since __section unconditionally uses the stringification operator, we actually want the more verbose __attribute__((__section__())). Link: https://bugs.llvm.org/show_bug.cgi?id=42950 Link: https://lkml.kernel.org/r/20200929194318.548707-1-ndesaulniers@xxxxxxxxxx Fixes: commit e04462fb82f8 ("Compiler Attributes: remove uses of __attribute__ from compiler.h") Signed-off-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Cc: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx> Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Cc: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> Cc: Nathan Chancellor <natechancellor@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/compiler.h~compilerh-avoid-escaped-section-names +++ a/include/linux/compiler.h @@ -155,7 +155,7 @@ void ftrace_likely_update(struct ftrace_ extern typeof(sym) sym; \ static const unsigned long __kentry_##sym \ __used \ - __section("___kentry" "+" #sym ) \ + __attribute__((__section__("___kentry+" #sym))) \ = (unsigned long)&sym; #endif _ Patches currently in -mm which might be from ndesaulniers@xxxxxxxxxx are compiler-clang-add-build-check-for-clang-1001.patch revert-kbuild-disable-clangs-default-use-of-fmerge-all-constants.patch revert-arm64-bti-require-clang-=-1001-for-in-kernel-bti-support.patch revert-arm64-vdso-fix-compilation-with-clang-older-than-8.patch partially-revert-arm-8905-1-emit-__gnu_mcount_nc-when-using-clang-1000-or-newer.patch compiler-gcc-improve-version-error.patch compilerh-avoid-escaped-section-names.patch