This is the mail archive of the binutils@sources.redhat.com 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: [arm] EABI annotation of thumb symbols.


Daniel Jacobowitz <drow@false.org> writes:

> > That said, I'm building Thumb shared libraries in which the PLT takes
> > up 120K, or some 4.5% of the text section size.  It's probably
> > possible to use version scripts to force some of the symbols to be
> > local, but this source code is neither from us nor from our customer,
> > so that is not a simple task.  Using Thumb instructions in the PLT
> > would give me some clearly measurable size improvements.
> 
> Would it really?  Here's an alternative: in the patches I'll be
> posting, I add support for independently sized PLT entries.  It would
> then be relatively simple (not trivial, because of relaxation problems,
> but doable) to use a two instruction ARM PLT sequence if it is in
> range.  The largest shared library I have handy at the moment has an
> 85K PLT using the new three-word entries, and the first word is
> _always_ redundant.  Then use interworking branches to get to the PLT.
> 
> I doubt you'll get a Thumb PLT sequence under eight bytes.

I don't know what the three-word PLT entry is.  By relaxation, do you
mean loading a GOT index into a register and then branching to the
symbol resolution routine?  That would work for the first 256 GOT
entries, and for some subset of the subsequent ones.  Or did you have
something else in mind?

The eight-byte Thumb sequence includes the offset word, and relies on
branching to common code to do the rest of the work.  I agree that it
is unlikely to get smaller than that.

Ian


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