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.
This commit is contained in:
Josh Poimboeuf 2014-06-14 19:12:20 -05:00
parent 844af68115
commit bba8d1cc2b

View File

@ -1660,7 +1660,7 @@ void kpatch_create_dynamic_rela_sections(struct kpatch_elf *kelf,
sec->sh.sh_type = SHT_PROGBITS; sec->sh.sh_type = SHT_PROGBITS;
sec->sh.sh_entsize = sizeof(*dynrelas); sec->sh.sh_entsize = sizeof(*dynrelas);
sec->sh.sh_addralign = 8; sec->sh.sh_addralign = 8;
sec->sh.sh_flags = SHF_ALLOC; sec->sh.sh_flags = SHF_ALLOC | SHF_WRITE;
/* create .rela.kpatch.dynrelas*/ /* create .rela.kpatch.dynrelas*/