This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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: gcc problem or not ?


On Fri, Jan 14, 2005 at 07:20:34PM +0300, Nickolay wrote:
> Hello
> 
> Board IXDP425.
> 
> Attempt build simple Hello World application:
> 
> #include <stdio.h>
> 
> int main() {
>        printf ("Hello World!\n");
>        return 0;
> }
> 
> arm-elf-gcc -mcpu=xscale -mbig-endian -I/gnutools/arm-elf/include/ -L 
> /gnutools/arm-elf/lib/xscale/be/ a.c -lc
> 
> but ./a.out fall with "Segmentation Fault".
> Where i am mistaked?

This is not a gcc bug, its a user bug. -lc will cause the linker to
try to link your ARM application with your hosts i386 libc. This is
getting the linker confused and its bombing out.

Take a look at the following document which will tell you how to build
hello world.

http://ecos.sourceware.org/docs-latest/user-guide/building-and-running-sample-appliations.html

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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