Skip to content

Commit 26bea10

Browse files
Mikulas PatockaPeter Zijlstra
authored andcommitted
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: a3493b3 ("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
1 parent 0f61b18 commit 26bea10

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • tools/objtool/include/objtool

tools/objtool/include/objtool/warn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ static inline void unindent(int *unused) { indent--; }
152152
if (unlikely(insn->sym && insn->sym->pfunc && \
153153
insn->sym->pfunc->debug_checksum)) { \
154154
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);\
157157
free(insn_off); \
158158
} \
159159
})

0 commit comments

Comments
 (0)