[uClibc] RE: [PATCH] possible fix for weak symbols in ldso [Was: Strange dynamic symbol in PPC]

Manuel Novoa III mjn3 at codepoet.org
Wed Feb 4 13:58:00 UTC 2004


On Wed, Feb 04, 2004 at 12:55:05PM +0100, Joakim Tjernlund wrote:
> > On Tue Feb 03, 2004 at 10:34:34PM +0100, Joakim Tjernlund wrote:
> > > > > > 
> > > > > > Managed to cross compile the stuff uClibc/test/dlopen for PPC.
> > > > > > 
> > > > > > dltest reports "Weak values resolved incorrectly". I 
> > guess that
> > > > > > this test shows the problem described above?
> > > > > 
> > > > > Yep, that is indeed the problem.
> > > > 
> > > > This patch will make the dltest above pass(dltest2 also passes).
> > > > I don't know if I broke something else, but it is a start.
> > > > 
> > > > Possibly a modified test should be used instead, where 
> > > > something better
> > > > than "weak_result != 0" is used. 
> > > > 
> > > > Comments?
> > > > 
> > > >  Jocke
> > > 
> > > Anyone?
> > 
> > mjn3 tried your patch and found it was insufficient to fix more
> > complicated examples with the same problem...  The test he used
> > was a java hello world compiled with a uClibc version gcj.  It
> > still exhibited the problem.
> 
> OK, is there a simpler way to reproduce the problem? I don't have gcj nor do I known
> how enable it under buildroot.

As I recall, the cross compiling gcj builds find.  All that's needed is
adding java to TARGET_LANGUAGES in gcc-uclibc-3.3.mk.  There were a couple
of issues building the native compiler though, which I tweaked by hand and
haven't automated in buildroot.

Also, I was building locale-enabled and there was an iconv UCS-2 default
endianness issue that I need to look into.  I had to force that by
inserting a BOM at the start of the test app source.

I have not tried to see if there is a simpler way to trigger the
problem.  ldd on the test app shows the following.

  libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x40007000)
  libgcj.so.4 => /usr/lib/libgcj.so.4 (0x4000f000)
  libm.so.0 => /lib/libm.so.0 (0x407eb000)
  libpthread.so.0 => /lib/libpthread.so.0 (0x407fd000)
  libdl.so.0 => /lib/libdl.so.0 (0x40810000)
  libc.so.0 => /lib/libc.so.0 (0x40813000)
  libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x408c8000)
  ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)

Manuel




More information about the uClibc mailing list