This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: !(fun) with tls


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

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]