[uClibc] Problem with soft-float and hidden symbol in libgcc(uclibc0.9.26/gcc 3.3.4)

Andrew de Quincey adq_dvb at lidskialf.net
Sat Oct 23 19:49:13 UTC 2004


On Saturday 23 Oct 2004 19:35, Joakim Tjernlund wrote:
> > On Saturday 23 Oct 2004 18:09, Joakim Tjernlund wrote:
> > > > Hi, looking back at the mailing list, this problem seems to crop up
> > > > now and then. I'm creating a cross compiling toolchain from
> > > > i386->ppc405 using soft float.
> > > >
> > > > (latest toolchain build scripts from CVS - gcc 3.3.4/ uclibc 0.9.26)
> > > >
> > > > It all seems to work, except for the same sort of messages as in:
> > > >
> > > > http://www.uclibc.org/lists/uclibc/2004-March/008520.html
> > > >
> > > > (hidden symbol __eqdf2 referenced by DSO).
> > > >
> > > > I investigated a bit, and it only happens when doing a shared link.
> > > > It seems to be because uclibc's libc.so and libm.so are not linked
> > > > against libgcc when they are built - so they end up trying to pull in
> > > > symbols from libgcc.a - which gcc objects to.
> > > >
> > > > I found two ways of fixing this - both involve editing the
> > > > libm/Makefile and libc/Makefile "shared" targets. Basically, you
> > > > either add "-lgcc_s" or "-lgcc
> > > > -L/path/to/your/stagingdir/lib/gcc-lib/ppc-405-linux-uclibc/3.3.4/"
> > > > to the LD command.
> > >
> > > Try copying the libm* files from .../uClibc/lib dir to
> > > .../staging_dir/lib
> >
> > Hi, I tried this - makes no difference - the files in my uClibC/lib dir
> > are identical to those in my staging dir anyway.
> >
> > Just want to point out - I do have things building and running properly
> > now using my fix (the -lgcc -L... one) - I just posted to see if this was
> > a good way to do it - and also (assuming it is :) to help other people
> > out with the same problem as it seems to come up a lot.
>
> This looks like the bug I found, libm* was built with gcc-intial and not
> with gcc-final. The -lgcc worked for me as well but that is an ugly fix.
> Perhaps you have to rebuild libm* in uClibc and then copy it to
> staging_dir/lib

I get you. OK, I built the toolchain (without my -lgcc hack) and it installed 
in the staging dir. Then I went back into the uClibc dir, and did a make 
clean; make. Finally, I copied the rebuilt lib/libm* and lib/libc* back 
across into my staging dir. The toolchain used to compile was definitely that 
installed in the staging directory - so it should be the gcc-final one.

Unfortunately, the rebuilt components have exactly the same problem. I'm happy 
to try other suggestions if you have them though.



More information about the uClibc mailing list