[PATCH] x86: Warn .insn instruction with length > 15 bytes

Jiang, Haochen haochen.jiang@intel.com
Thu Feb 8 04:09:58 GMT 2024


> > Plus, as you have learnt from Michael's responses, I'm not the only one
> > to think that this diagnostic ought to continue to be a warning by
> > default.
> >

IMO, since 15 bytes is a golden rule, generating code for >15 byte should
be treated as wrong and throw an error.

Especially when there are more and more prefixes, users gets more chance
to generate too long code and get wrong result when they even don't know
why if they don't care about warning. It is unacceptable.

We need to first meet the scenario for those users who will not dig into
everything. Therefore, warning is not enough.

For those who need more bytes, we could assume that they are quite familiar
with assembler, an option to lower to warning for them is ok

Thx,
Haochen

> 
> I can also tell you that there are other binutils developers who want to
> treat this as an error.   Should I ask them for their opinions?
> 
> --
> H.J.


More information about the Binutils mailing list