Re: [PATCH] objtool: Print bfd_vma as unsigned long long on ia32-x86_64 cross build
From: Josh Poimboeuf
Date: Mon Jan 26 2026 - 19:22:26 EST
On Mon, Jan 26, 2026 at 04:57:35AM +0000, Dmitry Safonov wrote:
> When objtool is cross-compiled in ia32 container for x86_64 target it
> fails with the following errors:
>
> > disas.c: In function 'disas_print_addr_sym':
> > disas.c:173:38: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'bfd_vma' {aka 'long long unsigned int'} [-Werror=format=]
> > 173 | DINFO_FPRINTF(dinfo, "0x%lx <%s>", addr, symstr);
> > | ^~~~~~~~~~~~ ~~~~
> > | |
> > | bfd_vma {aka long long unsigned int}
>
> Provide a correct printf-fmt depending on sizeof(bfd_vma).
>
> Cc: Alexandre Chartre <alexandre.chartre@xxxxxxxxxx>
> Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Fixes: 5d859dff266f ("objtool: Print symbol during disassembly")
> Signed-off-by: Dmitry Safonov <dima@xxxxxxxxxx>
Thanks!
Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
--
Josh