Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

objtool: fix compilation failure with the x32 toolchain

When using the x32 toolchain, compilation fails because the printf
specifier "%lx" (long), doesn't match the type of the "checksum" variable
(long long). Fix this by changing the printf specifier to "%llx" and
casting "checksum" to unsigned long long.

Fixes: a3493b33384a ("objtool/klp: Add --debug-checksum=<funcs> to show per-instruction checksums")

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/a1158c99-fe0e-a218-4b5b-ffac212489f6@redhat.com

authored by

Mikulas Patocka and committed by
Peter Zijlstra
26bea104 0f61b186

+2 -2
+2 -2
tools/objtool/include/objtool/warn.h
··· 152 152 if (unlikely(insn->sym && insn->sym->pfunc && \ 153 153 insn->sym->pfunc->debug_checksum)) { \ 154 154 char *insn_off = offstr(insn->sec, insn->offset); \ 155 - __dbg("checksum: %s %s %016lx", \ 156 - func->name, insn_off, checksum); \ 155 + __dbg("checksum: %s %s %016llx", \ 156 + func->name, insn_off, (unsigned long long)checksum);\ 157 157 free(insn_off); \ 158 158 } \ 159 159 })