mirror of https://github.com/dynup/kpatch
kpatch-build: rela section could disappear after patched
After patched, rela information for some sections could disappear. For example, a function like the following: " notrace noinline static int version_proc_show(struct seq_file *m, void *v) { return 0; } " Apart from common rela entries, trace and return thunk mechanism will generate rela information. Use `notrace` to remove the effect of trace. Make CONFIG_RETHUNK=n can remove the effect of return thunk. Discovered-by: Zongwu Li <lizongwu@huawei.com> Signed-off-by: Longjun Luo <luolongjuna@gmail.com>
This commit is contained in:
parent
b10d0e2212
commit
9fac261ed0
|
@ -974,7 +974,7 @@ static void kpatch_correlate_section(struct section *sec_orig,
|
|||
__kpatch_correlate_section(sec_orig->base, sec_patched->base);
|
||||
sec_orig = sec_orig->base;
|
||||
sec_patched = sec_patched->base;
|
||||
} else if (sec_orig->rela) {
|
||||
} else if (sec_orig->rela && sec_patched->rela) {
|
||||
__kpatch_correlate_section(sec_orig->rela, sec_patched->rela);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue