GNU gcc ld script problem

Nathan Field ndf@ghs.com
Fri Feb 6 02:46:00 GMT 2004


On Thu, 5 Feb 2004, Daniel Jacobowitz wrote:

> On Thu, Feb 05, 2004 at 01:04:27PM -0500, Ian Lance Taylor wrote:
> > Nathan Field <ndf@ghs.com> writes:
> > 
> > > 	But the contents of the .stub section *are* the PLT for each
> > > object. I should have been clearer about that. Perhaps the real bug is
> > > that the compiler is associating .plt sections in objects to .stub
> > > sections? As far as I can tell the only thing which is put into the .stub 
> > > section is the PLT, but I've only looked at fairly simple test cases.
> > 
> > In what sense is your .stub section the PLT?  When using ELF the PLT
> > requires special dynamic relocations.  Those are normally created
> > automatically by the linker when it builds the PLT.  Do those exist
> > for your .stub section?
> 
> No, MIPS does not use _JUMP_SLOT relocations.  The .stub entries serve
> a similar purpose to the PLT, but they work directly out of the .got. 
> Like the .plt, they are linker-generated.

	My request is that the stub code which is generated by the linker
(and placed into an internal input .stub section) be placed into its own
output section (.plt, .stub, or otherwise) rather than being lumped in
with the .text.  The reason is that I work on a debugger which needs to
readily identify the dispatch table for single stepping (into a function
located in another shared object) purposes.  Up unti now (i.e. on PPC,
x86, and SPARC) I have been able to just look for the ".plt" section.

	nathan

-- 
Nathan Field (ndf@ghs.com)			          All gone.

But the trouble with analogies is that analogies are like goldfish:
sometimes they have nothing to do with the topic at hand.
        -- Crispin (from a posting to the Bugtraq mailing list)



More information about the Binutils mailing list