[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aV2EwLdkXgJHf8Bz@redhat.com>
Date: Tue, 6 Jan 2026 16:55:12 -0500
From: Joe Lawrence <joe.lawrence@...hat.com>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] objtool: fix compilation failure with the x32 toolchain
On Tue, Jan 06, 2026 at 12:13:15PM +0100, Mikulas Patocka wrote:
> 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.
>
> Signed-off-by: Mikulas Patocka <mpatocka@...hat.com>
> Fixes: a3493b33384a ("objtool/klp: Add --debug-checksum=<funcs> to show per-instruction checksums")
>
> ---
> tools/objtool/include/objtool/warn.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/tools/objtool/include/objtool/warn.h
> ===================================================================
> --- linux-2.6.orig/tools/objtool/include/objtool/warn.h 2025-12-31 20:10:31.000000000 +0100
> +++ linux-2.6/tools/objtool/include/objtool/warn.h 2025-12-31 20:14:15.000000000 +0100
> @@ -152,8 +152,8 @@ static inline void unindent(int *unused)
> if (unlikely(insn->sym && insn->sym->pfunc && \
> insn->sym->pfunc->debug_checksum)) { \
> char *insn_off = offstr(insn->sec, insn->offset); \
> - __dbg("checksum: %s %s %016lx", \
> - func->name, insn_off, checksum); \
> + __dbg("checksum: %s %s %016llx", \
> + func->name, insn_off, (unsigned long long)checksum);\
> free(insn_off); \
> } \
> })
>
Acked-by: Joe Lawrence <joe.lawrence@...hat.com>
--
Joe
Powered by blists - more mailing lists