This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: as: How to determine the section of symbols


On Thu, Jul 18, 2019 at 01:39:12PM -0700, H.J. Lu wrote:
> On Thu, Jul 18, 2019 at 4:28 AM Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > 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.
> 
> How much reduction in kernel size does it provide?  Do you have a small real
> usage example in assembly code?

Drops a x86_64-defconfig build by about 6k. Let me go find a simple
case.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]