From 3641662601bbd28af93a6d89411427321aeba748 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Mon, 2 Jun 2014 14:17:58 -0500 Subject: [PATCH] create-diff-object: don't replace section ref with section ref Don't replace a section reference with a section reference (duh). Fixes #225. --- kpatch-build/create-diff-object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index ad77a1d..a59d8f9 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -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) {