as: How to determine the section of symbols
Thu Jul 18 11:28:00 GMT 2019
On Tue, Jul 16, 2019 at 10:43:27AM +0200, Peter Zijlstra wrote:
> On Mon, Jul 15, 2019 at 01:10:42PM -0700, H.J. Lu wrote:
> > .d8 is only a hint. Is that possible to use the new ".nops SIZE" directive
> > where SIZE can be an expression.
> The problem appears to be constructing an expression that yields the
> exact same semantics as jmp. Given that GCC might provide us with a
> label into another section, we cannot (per the above as documentation)
> compute a displacement. Or ever detect this case.
Would it be possible to implement a new mnemonic "nopjmp" that acts the
exact same as "jmp" but emits either nop2/nop5 instead of actual jumps?
Then I'll need to change the kernel to read the instruction to determine
size, but at least the nops and jmps would be consistently sized.
More information about the Binutils