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: powerpc new PLT and GOT


On Wed, 2005-05-11 at 16:10, Daniel Jacobowitz wrote:
> On Thu, May 12, 2005 at 12:14:58AM +0930, Alan Modra wrote:
> > I could, but .plt is traditionally a (somewhat) regular array.  .glink
> > doesn't really fit this model since it could be dispersed throughout the
> > text segment, something you might want to do in large programs where the
> > 24-bit powerpc branch offset is limiting.  I know I don't support such
> 
> This is not exclusive to PowerPC.  For instance, the ARM PLT could be
> distributed this way (and that would be a useful thing to support for
> sufficiently large applications - but ARM doesn't have a ton of those).
> And I've implemented irregularly sized entries in ARM's .plt.
> 

It's more of a problem in Thumb than in ARM.  In Thumb the addressing
range is limited to +/- 4M, which, given that the plt is always at one
end of the shared library (well, in the GNU linker, anyway) that
effectively limits your shared library size to 4Mb of text segment which
IS a significant limitation (libgcj, for example, is substantially
larger than that ;-).  It is possible (with a sufficiently smart linker)
to put trampolines in to enable you to span more address space than
that, but when the target is then a plt trampoline it would be much more
efficient to put in multiple plt fragments and then bind a call to the
nearest one.


R.


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