create-diff-object: don't replace section ref with section ref

Don't replace a section reference with a section reference (duh).

Fixes #225.
This commit is contained in:
Josh Poimboeuf 2014-06-02 14:17:58 -05:00
parent a705c223fc
commit 3641662601

View File

@ -750,7 +750,8 @@ void kpatch_replace_sections_syms(struct kpatch_elf *kelf)
continue;
list_for_each_entry(sym, &kelf->symbols, list) {
if (sym->sec != rela->sym->sec)
if (sym->type == STT_SECTION ||
sym->sec != rela->sym->sec)
continue;
if (rela->type == R_X86_64_PC32) {