[uClibc] Strange dynamic symbol in PPC

Manuel Novoa III mjn3 at codepoet.org
Mon Jan 26 18:33:32 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 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.

Manuel



More information about the uClibc mailing list