mirror of https://github.com/dynup/kpatch
kpatch-elf: copy ELF e_flags from patched .o
Kernel v6.2+ commit de3d098dd1fc ("powerpc/64: Add module check for ELF ABI version") now verifies the ELF header e_flags for its ABI value and refuse to load modules with complaint, "Invalid module architecture in ELF header: 21" Like other ELF header details, copy the flags from the reference ELF input file to the new ELF file to avoid module load errors. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
parent
7d22fefa35
commit
2ddeccccb2
|
@ -948,6 +948,7 @@ void kpatch_write_output_elf(struct kpatch_elf *kelf, Elf *elf, char *outfile,
|
|||
ehout.e_machine = eh.e_machine;
|
||||
ehout.e_type = eh.e_type;
|
||||
ehout.e_version = EV_CURRENT;
|
||||
ehout.e_flags = eh.e_flags;
|
||||
|
||||
shstrtab = find_section_by_name(&kelf->sections, ".shstrtab");
|
||||
if (!shstrtab)
|
||||
|
|
Loading…
Reference in New Issue