Skip to content

Commit

Permalink
create-diff-object: support .data..read_mostly relocations
Browse files Browse the repository at this point in the history
Replace .data..read_mostly references with their corresponding symbol
references.

Fixes dynup#219.
  • Loading branch information
jpoimboe committed May 29, 2014
1 parent ad8f229 commit aa134ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,12 +718,13 @@ void kpatch_replace_sections_syms(struct kpatch_elf *kelf)
}

/*
* .data..percpu is a special data section whose data
* The following 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.
* 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"))
continue;
list_for_each_entry(sym, &kelf->symbols, list) {

Expand Down

0 comments on commit aa134ef

Please sign in to comment.