[uClibc] Strange dynamic symbol in PPC

Joakim Tjernlund Joakim.Tjernlund at lumentis.se
Mon Jan 26 19:12:47 UTC 2004


> On Mon, Jan 26, 2004 at 05:58:12PM +0100, Joakim Tjernlund wrote:
> > > On Mon, Jan 26, 2004 at 05:26:30PM +0100, Joakim Tjernlund wrote:
> > > > Thanks for your reply. I am not using Java, just standard buildroot from CVS. I am trying to improve ldso for PPC.
> > > > Is it appropriate for busybox to contain this symbol and relocate it to address 0?
> > > 
> > > Yes since a weak reference is contained in the crtbegin stuff.  The
> > > value of the function pointer is checked to be non-null before it is
> > > called.  If you were using gcj and libgcj then it would be non-null.
> > 
> > OK, it is just very annoying. I have located the symbol to the thread libs in uClinux. Maybe I will
> > have a look to see if it can be avoided for non Java apps.
> 
> As I said, it is in crtbegin.o, which is supplied by gcc.  It is added
> to the link automaticly by the linker script.  Or try "gcc -v someapp.c"
> to see where it is added.

As far as I can tell, only libpthread.so and libthread_db.so contain that symbol.
They contain this symbol because they are build with crtbeginS.o and crtendS.o instead of
crtbegin.o and crtend.o. Not sure why, but apparently the *S.o has to do with shared libs, but
why that would imply java stuff I don't know(yet).

> 
> > > As an aside, gcj does seem to work on for staticly linked apps.
> > > Unfortunately, dynamicly linked apps trigger the long-standing bug
> > > in the shared lib loader.  I've mentioned it to Erik.
> > 
> > What long standing bug? I have recently fixed ppc ldso and Erik has committed it to CVS. I don't
> > know of any outstanding bugs.
> 
> There is a bug connected with overriding weak symbols.  It occurs with
> dlopen() at least.  While Erik has made improvements, the bug is still
> there.  I originally tripped it when running the perl self-tests about
> 1.5 years ago.  See the tests in test/dlopen...  dlopen.c in particular.

OK, had a look at dlopen.c, but I didn't get any wiser. Is this bug PPC specific?

             Jocke
> 
> Manuel



More information about the uClibc mailing list