Segfault when running cross complied glibc libs.
Tushar
tushar@mwti.net
Mon Jan 17 11:42:00 GMT 2005
Hi all,
I have a cross tool chain with glibc 2.2.2. , binutil 2.12 and gcc
3.2.1. Target machine has ARM Xscale. On target version of glibc is
2.3.2. So I downloaded newer binutil 1.14 and glibc 2.3.2. First I cross
compiled my binutil using
./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu \
--target=armeb-xscale-linux-gnu
\ --prefix=/home/tushar/crosstool/bin
--with-cpu=xscale \
--with-lib-path=/home/tushar/crosstool/target/usr/local/lib \
:/home/tushar/crosstool/target/lib: \
/home/tushar/crosstool/target/lib
First , am I doing anything wrong in cross compilation of binutil?
In target folder my root file system for target board resides.
I tested binutil using some test programs (Shared and dynamic) and they
worked on target.
Then I cross compiled glibc using
CC=/home/tushar/crosstool/bin/xscale_be-gcc CC_FOR_BUILD=gcc \
../glibc-2.3.2/configure --build=i686-gnu-linux \
--host=arm-xscale-linux-gnu \
--target=arm-xscale-linux-gnu \
--without-cvs --enable-add-ons --prefix=/ \
--with-cpu=xscale --without-fp \
--enable-shared
Then I transfered libpthread-0.10.so on target and tried one program
dynamically linked.
/home/tushar/crosstool/bin/xscale_be-gcc -o main main.c -lpthread.
When I try to run it on target, I gives Segfault.
But when I replaced entire /lib dir of target with new glibc /lib,
other programs of target are working(link busybox). So it seems that
problem is only with programs that I cross compile using new binutil and
glibc on my machine.
What can be reason for this. Am I making any mistake in configuration?
Thanks in Advance.
Tushar
More information about the Binutils
mailing list