[PATCH 3/3] x86/disasm: rework comment handling

Mark Wielaard mark@klomp.org
Sat May 23 09:51:35 GMT 2026


Hi Jan,

On Fri, May 15, 2026 at 03:08:19PM +0200, Jan Beulich wrote:
> Model this after operand handling, such that comments can be emitted in
> the same order as operands. %rip-relative address comments remain
> separate for now. While there correct style for the symbols associated
> with immediates: These aren't "comment starts", but symbol names.

On some GCC versions (specifically power9 ubuntu 13.3.0, riscv ubuntu
14.2.0, armhf armbian 12.2.0) this fails with:

../../binutils-gdb/opcodes/i386-dis.c:10387:9: error: format not a string literal and no format arguments [-Werror=format-security]
10387 |         i386_dis_printf (info, dis_style_comment_start, sep);
      |         ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Because it cannot see sep as being a string literal. Could probably be
fixed (not tested) using:

 i386_dis_printf (info, dis_style_comment_start, "%s", sep);

Cheers,

Mark

[*] Failing buildbots:
https://builder.sourceware.org/buildbot/#/builders/167/builds/12109
https://builder.sourceware.org/buildbot/#/builders/294/builds/4615
https://builder.sourceware.org/buildbot/#/builders/80/builds/5007


More information about the Binutils mailing list