Lazy linking issues

Alan Modra alan@linuxcare.com.au
Wed, 27 Sep 2000 01:21:24 +1100 (EST)


On Tue, 26 Sep 2000, Alan Modra wrote:

> Code at the start of the .plt looks like:
> 	b,l	1f,%r26
> 	depi	0,31,2,%r26
> 1:	addil	LD'_GLOBAL_OFFSET_TABLE_ + 8 - ($PIC_pcrel$0 - 8),%r26
> 	ldwm	RD'_GLOBAL_OFFSET_TABLE_ + 8 - ($PIC_pcrel$0 - 12)(%r1),%r26
> 	copy	%r19,%r25
> 	ldw	4(%r1),%r19
> 	bv	%r0(%r26)
> 	ldw	-4(%r1),%r26

That's all a bit silly.  How come no-one noticed and told me how foolish 
I am?  We can't trash the arg registers willy-nilly.

I'm going for a stub at the end of the .plt, with .plt and .got guaranteed
to be glued together.  The fixup fptr will be immediately after the stub
at the end of the .plt, ie. at got[-2] istead of got[2].

Alan Modra
-- 
Linuxcare.  Support for the Revolution.