!(fun) with tls
Colin Paul Gloster
Fri Jun 2 16:49:00 GMT 2006
On Fri, 2 Jun 2006 10:36:29 -0500, NZG emailed:
[..] attempt to link against it: with
*.o -Wl -Llib/dynamic -o hello -lc-2.3.2
lib/dynamic/libc-2.3.2.so: undefined reference to
Shouldn't this work? I see a tls in there (hence the title of the email)
need to build with tls?"
I do not know. Also, do you know for sure whether _dl_tls_symaddr is
connected to thread-local storage or is a symbol for something completely
different which might also be abbreviated as tls?
More importantly, the cross compiler can't link against the pthreads
of this version
Attempting to do so yields:
modreg.o -Wl -Llib/dynamic ../../lib/static/libmodbus.a -o
lib/dynamic/libpthread-0.10.so: undefined reference to
Some things you could try are compiling the pthreads library or another
version of GNU LibC.
I thought, ok, maybe it's a tls thing, so I tried to build a tls
eval `cat i386.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh all.sh --notest
but the build crashes with [..] errors [..]"
Even when compiling a native GCC with a native GCC without crosstool, not
all versions of GCC >= 2.95 work, no matter what is written in GCC's
documentation so perhaps you might try one of the other
If that does not work and nothing else does, and if you somehow determine
for certain that _dl_tls_symaddr@GLIBC_PRIVATE is definitely unused --
which we have no good reason to suspect, but it is not uncommon for a few
symbols which are linked in to be unused, e.g. a program which might only
use a sine function is likely to have a cosine symbol and other
mathematical symbols linked in anyway -- you could create a dummy symbol
_dl_tls_symaddr@GLIBC_PRIVATE but I would not recommend this.
On Fri, 2 Jun 2006 11:04:12 -0500, NZG emailed:
But how can I use other libraries, like pthreads and libm with this?"
You may unfortunately have to try a lot of approaches for compatibility.
It could easily get to the stage that you may need to recompile almost
everything installed on the target in which case it may be simpler to
simply remove everything on the target and replace its operating system
with one for which you do have a satisfactory cross development
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc