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, May 11, 2005 at 10:22:09AM -0400, Daniel Jacobowitz wrote:
> I'm not oing to look at the code, but I have one comment on the ABI.
> You've got a data section named .plt and a code section named .glink
> (well, you note that the text stubs can be anywhere in the text
> segment, but that's true on most architectures; I imagine that for now
> they're all going in a single .glink section).

Yes, they go in a single linker created .glink section, but this section
doesn't have it's own output section.  Instead, it contributes to .text.

> Everyone else seems to call the data section ".got.plt" and the text
> section ".plt".  GDB even knows about this; it uses the name ".plt" to
> help in skipping dynamic linker code.  Is there a reason why you can't
> use the traditional names?

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
a .glink at the moment on powerpc (as we do on powerpc64), but I might
in the future.  In that case you couldn't output .glink to its own
output section, so gdb could not use the section name to skip plt call
stubs.

Then, given that .glink doesn't really fit the traditional .plt, I don't
want to use .got.plt because I feel some section ought to be called
.plt, simply because that's the traditional name for sections associated
with dynamic function linkage.  Powerpc64 also has a .plt that just
consists of data.

You're not the first to suggest .got.plt though.  :)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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