!(fun) with tls

Mike Frysinger vapier@gentoo.org
Sun Jun 4 15:04:00 GMT 2006


On Friday 02 June 2006 11:36, NZG wrote:
> I copy my new toolchain into my SDK and build a test program, no problem.

ok so far

> I copy the libc from my target
> libc-2.3.2.so
>
> and attempt to link against it: with
> gcc-3.4.3-glibc-2.3.2/i386-unknown-linux-gnu/bin/i386-unknown-linux-gnu-gcc
> *.o -Wl -Llib/dynamic -o hello -lc-2.3.2

this is where you screw yourself

you cant mix and match different glibc libs from different versions ... as 
mentioned, the debian 2.3.2 is a heavily patched one so it isnt really 2.3.2

so either copy all the glibc libs from your target (including ld-linux.so) and 
link with:
gcc-3.4.3-glibc-2.3.2/i386-unknown-linux-gnu/bin/i386-unknown-linux-gnu-gcc -Blib/dynamic/
(make sure you have the same libs/links in lib/dynamic/ as you would in /lib/ 
and /usr/lib/ on the target ... dont go renaming things like 'libc-2.3.2.so' 
and try to link with '-lc-2.3.2'
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20060604/107e6a48/attachment.sig>


More information about the crossgcc mailing list