This patch adds something like the following code: 6: 48 c7 c2 00 00 00 00 mov $0x0,%rdx d: 48 c7 c6 00 00 00 00 mov $0x0,%rsi 10: R_X86_64_32S .rodata.str1.1+0x3c 14: 31 c0 xor %eax,%eax 16: 48 89 e5 mov %rsp,%rbp 19: 53 push %rbx 1a: 48 89 fb mov %rdi,%rbx 1d: e8 00 00 00 00 callq 22 1e: R_X86_64_PC32 seq_printf-0x4 where we're interested in how the R_X86_64_32S relocation for the function pointer gets resolved. Issue #755, "kpatch-build, x86: do not use the patched functions as callbacks directly," modified create-diff-object so that the addresses of the original functions were used instead of patched equivalents. --- a/fs/proc/cmdline.c 2018-01-12 10:41:01.207537265 -0500 +++ b/fs/proc/cmdline.c 2018-01-12 10:41:59.156981302 -0500 @@ -5,6 +5,11 @@ static int cmdline_proc_show(struct seq_file *m, void *v) { + int (*fp)(struct seq_file *, void *); + + fp = &cmdline_proc_show; + seq_printf(m, "kpatch: cmdline_proc_show = %p\n", fp); + seq_printf(m, "%s\n", saved_command_line); return 0; }