New .nops directive, to aid Linux alternatives patching?
Thu Feb 8 20:18:00 GMT 2018
On 08/02/2018 20:10, H.J. Lu wrote:
> On Thu, Feb 8, 2018 at 11:26 AM, Andrew Cooper
> <firstname.lastname@example.org> wrote:
>> I realise this is a little bit niche, but how feasible would it be to
>> introduce a new .nops directive which takes a size parameter, and
>> outputs long nops covering the number of specified bytes?
> Sounds to me you want a pseudo NOP instruction:
> pseudo-NOP N
> which generates a long NOP with N byte. Is that correct. If yes,
> what is the range of N?
Currently 255 based on other implementation limits, and I expect that
ought to be long enough for anyone.Â There is one existing user for
N=43, and I expect that to grow a bit.
The real answer properly depends at what point it is more efficient to
jmp rather than wasting decode bandwidth decoding nops, and I don't know
the answer, but expect that it isn't larger than 255.
More information about the Binutils