[GIT PULL] objtools fix for v5.14
From: Ingo Molnar
Date: Mon Jun 28 2021 - 01:51:00 EST
Linus,
Please pull the latest objtool/urgent git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git objtool-urgent-2021-06-28
# HEAD: e31694e0a7a709293319475d8001e05e31f2178c objtool: Don't make .altinstructions writable
A single ELF format fix for a section flags mismatch bug that breaks
kernel tooling such as kpatch-build.
Thanks,
Ingo
------------------>
Josh Poimboeuf (1):
objtool: Don't make .altinstructions writable
tools/objtool/arch/x86/decode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
index 523aa4157f80..bc821056aba9 100644
--- a/tools/objtool/arch/x86/decode.c
+++ b/tools/objtool/arch/x86/decode.c
@@ -684,7 +684,7 @@ static int elf_add_alternative(struct elf *elf,
sec = find_section_by_name(elf, ".altinstructions");
if (!sec) {
sec = elf_create_section(elf, ".altinstructions",
- SHF_WRITE, size, 0);
+ SHF_ALLOC, size, 0);
if (!sec) {
WARN_ELF("elf_create_section");