[PATCH] x86: Add .nop directive to assembler

Michael Matz matz@suse.de
Thu Feb 15 15:50:00 GMT 2018


Hi,

On Thu, 15 Feb 2018, Jan Beulich wrote:

> >> to be an expression, none of the above is really suitable.
> > 
> > Well, that could be easily rectified.  Something along the lines of:
> 
> I didn't make the remark because of foreseeing any issues with
> coding this up, but because @NOP (or any of your other
> suggestions) could actually be a valid symbol name, which could be
> valid to use here even if it's not part of any expression in case it's
> an absolute one (e.g. an equate).

Well, then I don't see other ways of special casing something that also is 
a valid expression right now, like your string suggestion.  The problem of 
course being that this would reinterpret currently valid (though 
strange) directives into something else.  Right now
  .skip 10, "foo"
is equivalent to
  .skip 10, foo
and results in 10 one-byte relocs against symbol 'foo'.  We'd reinterpret 
this, which may be fine, but needs to be a conscious decision.

> The leading @ is undesirable anyway because of ARM's use of it as a 
> comment char.

Sure, other prefix chars could be used, e.g. one of the binary operators 
in expressions.  But in light of the above it might not be such a bright 
idea to extend .skip after all.


Ciao,
Michael.



More information about the Binutils mailing list