mirror of
https://github.com/dynup/kpatch
synced 2024-12-24 14:12:06 +00:00
allow the user to ignore a rela section
If the user specifies KPATCH_IGNORE_SECTION for a rela section, ignore the corresponding text section instead of corrupting memory. Fixes #381.
This commit is contained in:
parent
c21cc1292f
commit
24ea032f9f
@ -1673,6 +1673,8 @@ void kpatch_mark_ignored_sections(struct kpatch_elf *kelf)
|
||||
if (!ignoresec)
|
||||
ERROR("KPATCH_IGNORE_SECTION: can't find %s", name);
|
||||
log_normal("ignoring section: %s\n", name);
|
||||
if (is_rela_section(ignoresec))
|
||||
ignoresec = ignoresec->base;
|
||||
ignoresec->ignore = 1;
|
||||
if (ignoresec->twin)
|
||||
ignoresec->twin->ignore = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user