bug in ld.so when called via dlopen()

Joakim Tjernlund joakim.tjernlund at transmode.se
Fri Aug 27 07:53:04 UTC 2010


>
> Hi,
>
> I have an issue with lua and a lua binding to c-client[1], limap[2].
> libc-client calls some callback functions supposed to be implemented
> in the main application.
>
> So various mm_* functions are implemented in limap.c as callbacks, for
> example mm_dlog().
>
> But when lua does dlopen() to load the module i get error:
> lua: symbol 'mm_dlog': can't resolve symbol in lib '/usr/lib/libc-client.so.1'
>
> I have simplified testcase here:
> wget -O - http://dev.alpinelinux.org/~ncopa/uclibc-dlopen-testcase.tar.gz
> | tar -zxf
>
> Both bar and baz works with glibc and bar fails on uclibc. Might be i
> do something wrong?

Didn't look into your testcase but uClibc differs from glibc w.r.t dependencies.
You need to have corrected DT_NEEDED entries in your libs that reflect
the true deps. At least it was like so when I impl. it but I have
no idea if NPTL changes this.

I think this is required in the specs. but glibc is more forgiving.



More information about the uClibc mailing list