[klibc] Re: got pointer wrong in shared klibc binary
H. Peter Anvin
hpa at zytor.com
Tue Sep 14 21:41:46 PDT 2004
Alan Modra wrote:
> On Wed, Sep 15, 2004 at 10:48:02AM +0930, Alan Modra wrote:
>
>>After using SHAREDFLAGS = -Ttext 0x0f000200 on ppc64 (which I see you
>>suggested in another email), I see the problem you're talking about.
>>
>>klibc is fundamentally broken on ppc64. You just can't call into
>>another chunk of code (klibc.so in this case) which has a separate toc
>>and expect things to work.
>>
>>You *might* get something working by copying the klibc.so .toc section
>>into each app linking to klibc.so.
>
>
> Well, the Horrible Hack does seem to work for me. Attached is a diff,
> including a fix for setjmp.S too. stmw/lmw only save the low 32 bits
> so can't really be used, and stmd/lmd aren't available.
>
Patch applied and pushed. I got a conflict on setjmp.S, so I'd
appreciate it if you could check that I merged it correctly.
Still waiting for my ppc64 box, sigh.
-hpa
More information about the klibc
mailing list