[uClibc] PowerPC Shared Library Problem

John Gordon jgordon at instant802.com
Sat Jun 19 21:36:52 UTC 2004


Joakim Tjernlund wrote:

>>Hello all,
>>
>>I am seeing error messages from our Kaffe port to PowerPC/uClibc which I 
>>don't see on other architectures we support in the same way (XScale & 
>>MIPS). The error is:
>>
>>kaffe-bin: symbol '_dl_dprintf' is type R_PPC_REL24
>>         Compile shared libraries with -fPIC!
> 
> 
> This printout is gone in CVS(ldso/ldso/powerpc/elfinterp.c). I removed it
> in one of my patches to ldso. I not sure that was a good idea, perhaps
> it should be restored?

Probably not necessary - it doesn't seem to be a warning for the other 
RISC chips that have similar relocation types. Oddly though they are 
also working, even though libdl.so contained these unexpected relocs. I 
wonder if that is just because we are not actually using the dynamic 
loader (it is a feature that is included in kaffe, but I don't think 
we're exercising it).

I haven't done very complete testing of this, but it would seem that a 
simple mod in the top level Makefile fixes the issue. Under the loop 
that currently creates the symbolic links

	if [ -f ldso/libdl/libdl_pic.a ]; then \
		rm -f $(PREFIX)$(DEVEL_PREFIX)lib/libdl_pic.a ; \
		$(INSTALL) -m 755 ldso/libdl/libdl_pic.a \
			$(PREFIX)$(DEVEL_PREFIX)lib/libdl_pic.a ; \
	fi

Basically, it removes any symbolic link called libdl_pic.a and replaces 
it with the real libdl_pic.a that was built under ldso/libdl.

With this in place, I can successfully start kaffe-bin on my PPC target, 
and our application Java code is able to run at least. Haven't done any 
thorough testing.

Rgds,
John...



More information about the uClibc mailing list