Skip to content

Commit

Permalink
Merge pull request #682 from rosslagerwall/strip-ignored-symbols
Browse files Browse the repository at this point in the history
create-diff-object: Strip kpatch_ignore_func_* symbols
Jessica Yu authored Mar 9, 2017
2 parents 41b2364 + 579ce0d commit 2553653
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions kpatch-build/create-diff-object.c
Original file line number Diff line number Diff line change
@@ -1694,11 +1694,18 @@ static void kpatch_mark_ignored_sections_same(struct kpatch_elf *kelf)
sym->status = SAME;
}
}

/* strip temporary global __UNIQUE_ID_kpatch_ignore_section_* symbols */
list_for_each_entry(sym, &kelf->symbols, list)
if (!strncmp(sym->name, "__UNIQUE_ID_kpatch_ignore_section_",
strlen("__UNIQUE_ID_kpatch_ignore_section_")))
sym->status = SAME;
}

static void kpatch_mark_ignored_functions_same(struct kpatch_elf *kelf)
{
struct section *sec;
struct symbol *sym;
struct rela *rela;

sec = find_section_by_name(&kelf->sections, ".kpatch.ignore.functions");
@@ -1720,6 +1727,12 @@ static void kpatch_mark_ignored_functions_same(struct kpatch_elf *kelf)
if (rela->sym->sec->rela)
rela->sym->sec->rela->status = SAME;
}

/* strip temporary global kpatch_ignore_func_* symbols */
list_for_each_entry(sym, &kelf->symbols, list)
if (!strncmp(sym->name, "__kpatch_ignore_func_",
strlen("__kpatch_ignore_func_")))
sym->status = SAME;
}

static void kpatch_create_kpatch_arch_section(struct kpatch_elf *kelf, char *objname)

0 comments on commit 2553653

Please sign in to comment.