From bba8d1cc2b9ad58b045f8f3438144c0e4f5e946a Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Sat, 14 Jun 2014 19:12:20 -0500 Subject: [PATCH] kmod/core: make dynrelas section writable On RHEL 7, the core module's write to dynrela->src causes a panic because the dynrela section is read-only. --- kpatch-build/create-diff-object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index 743b3be..563d8b6 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -1660,7 +1660,7 @@ void kpatch_create_dynamic_rela_sections(struct kpatch_elf *kelf, sec->sh.sh_type = SHT_PROGBITS; sec->sh.sh_entsize = sizeof(*dynrelas); sec->sh.sh_addralign = 8; - sec->sh.sh_flags = SHF_ALLOC; + sec->sh.sh_flags = SHF_ALLOC | SHF_WRITE; /* create .rela.kpatch.dynrelas*/