[uClibc] RE: error initializing thread_db library. (mipsel)
Joakim Tjernlund
joakim.tjernlund at lumentis.se
Thu Nov 18 09:30:45 UTC 2004
> I am trying to (remote) debug a threaded app on mipsel on a uClibc I
> got from CVS about two days ago.
>
> When the multi-threaded app starts, I get
> "gdb: error initializing thread_db library."
>
> I have identified the error to be "TD_VERSION".
> in libpthread/linuxthreads_db/td_ta_new.c.
> It seems to look up "__linuxthreads_version" correctly,
> at least if I display memory (in gdb) at the address
> td_lookup() returns for versaddr, the display
> labels that address <__linuxthreads_version>.
> But it doesn't read the expected version string there.
> If I do nm on the libpthread.so, it gives
> 000109f4 R __linuxthreads_version
> and if I examine the .so file, I find the expected
> version string at that offset.
> For what it's worth, the loaded address of __linuxthreads_version
> is not the base address of libpthread.so + 000109f4.
> It isn't supposed to be is it?
I think so, but MIPS is a strange machine so who knowns.
> In this case /lib/libpthread.so.0 is
> 0x2aaf20c0 to 0x2aafcae4, and __linuxthreads_version (versaddr) is
> 0x2aafcb54.
hmm, thats outside libpthread.so.0.
How is libpthread.so loaded, with dlopen or ldso?
Do you use top of CVS? I recently commited a MIPS spefic patch. Try with and
without that patch.
check if LD_BIND_NOW=1 makes a difference.
More information about the uClibc
mailing list