mirror of
https://github.com/dynup/kpatch
synced 2025-02-07 04:31:33 +00:00
create-diff-object: support .data..read_mostly and .data.unlikely
Support patching functions which uses these sections by converting references to these sections to symbol object references. Fixes #219.
This commit is contained in:
parent
00e9dc3b1d
commit
4a95a16911
@ -739,12 +739,14 @@ void kpatch_replace_sections_syms(struct kpatch_elf *kelf)
|
||||
}
|
||||
|
||||
/*
|
||||
* .data..percpu is a special data section whose data
|
||||
* symbols aren't bundled with sections when using
|
||||
* These are special data sections whose data symbols
|
||||
* aren't bundled with sections when using
|
||||
* -fdata-sections. We need to replace the section
|
||||
* references with their corresponding objects.
|
||||
*/
|
||||
if (strcmp(rela->sym->name, ".data..percpu"))
|
||||
if (strcmp(rela->sym->name, ".data..percpu") &&
|
||||
strcmp(rela->sym->name, ".data..read_mostly") &&
|
||||
strcmp(rela->sym->name, ".data.unlikely"))
|
||||
continue;
|
||||
list_for_each_entry(sym, &kelf->symbols, list) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user