Skip to content

Commit

Permalink
Merge pull request #564 from jpoimboe/more-static-fixes
Browse files Browse the repository at this point in the history
create-diff-object: static local uncorrelation/correlation fixes
  • Loading branch information
sjenning committed Nov 18, 2015
2 parents 792a4fc + 02d3c19 commit b781c0a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,14 @@ void kpatch_correlate_static_local_variables(struct kpatch_elf *base,
if (bundled && sym->sec->twin) {
sym->sec->twin->twin = NULL;
sym->sec->twin = NULL;

sym->sec->secsym->twin->twin = NULL;
sym->sec->secsym->twin = NULL;

if (sym->sec->rela) {
sym->sec->rela->twin->twin = NULL;
sym->sec->rela->twin = NULL;
}
}
}

Expand Down Expand Up @@ -1211,6 +1219,9 @@ void kpatch_correlate_static_local_variables(struct kpatch_elf *base,
sym->sec->twin = patched_sym->sec;
patched_sym->sec->twin = sym->sec;

sym->sec->secsym->twin = patched_sym->sec->secsym;
patched_sym->sec->secsym->twin = sym->sec->secsym;

if (sym->sec->rela && patched_sym->sec->rela) {
sym->sec->rela->twin = patched_sym->sec->rela;
patched_sym->sec->rela->twin = sym->sec->rela;
Expand Down

0 comments on commit b781c0a

Please sign in to comment.