elfnote-mark-all-note-sections-shf_alloc.patch removed from -mm tree
The patch titled
Subject: elfnote: mark all .note sections SHF_ALLOC
has been removed from the -mm tree. Its filename was
elfnote-mark-all-note-sections-shf_alloc.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Nick Desaulniers <[email protected]>
Subject: elfnote: mark all .note sections SHF_ALLOC
ELFNOTE_START allows callers to specify flags for .pushsection assembler directives. All callsites but ELF_NOTE use "a" for SHF_ALLOC. For vdso's that explicitly use ELF_NOTE_START and BUILD_SALT, the same section is specified twice after preprocessing, once with "a" flag, once without. Example:
.pushsection .note.Linux, "a", @note ;
.pushsection .note.Linux, "", @note ;
While GNU as allows this ordering, it warns for the opposite ordering, making these directives position dependent. We'd prefer not to precisely match this behavior in Clang's integrated assembler. Instead, the non __ASSEMBLY__ definition of ELF_NOTE uses __attribute__((section(".note.Linux"))) which is created with SHF_ALLOC, so let's make the __ASSEMBLY__ definition of ELF_NOTE consistent with C and just always use "a" flag.
This allows Clang to assemble a working mainline (5.6) kernel via:
$ make CC=clang AS=clang
---
include/linux/elfnote.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/elfnote.h renamed from include/linux/elfnote.h~elfnote-mark-all-note-sections-shf_alloc +1 -1
@@ -54,7 +54,7 @@ .popsection ;#define ELFNOTE (name, type, desc) \ - ELFNOTE_START(name, type, "") \ + ELFNOTE_START(name, type, "a") \ desc ; \ ELFNOTE_END
_
Patches currently in -mm which might be from [email protected] are