Segmentation fault in simple program for embedded Linux

Artur Fraczak artur.fraczak@s3group.com
Fri Jun 8 05:51:00 GMT 2001


Hi,

I would like to compile program for run Linux in embedded system.
And I have a problem.

Configuration:
BUILD = HOST: RedHat on PC
TARGET: board with MPC823 (FADS823) + Linux kernel
I have compiled: binutils-2.11, gcc-2.95.3, glibc-2.2.3, linux-2.4.4
I downloaded Linux kernel to the board.
I guess that gcc is OK. I used it to compile linux kernel and it works.
Now I would like to compile a simple program on my host and execute it
on the target.

My program is very simple:
int main(void)
{
    while(1)
        ;
}

I compile it as follows:
powerpc-linux-gcc -L/usr/local/powerpc/lib -static test.c
When I run a.out on the target I have message: Segmentation fault.
I guess that problem is in a startup code or library.

How can I solve it?
Some of you have a lot of experience in this field. Do you have any
ideas?
Thanks in advance.

Artur
artur.fraczak@s3group.com




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list