This is the mail archive of the crossgcc@sources.redhat.com 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: ARM gcc doesn't work



Hi Li Chengyuan.

>>However when I use the following method,it shows another error message:
>>        [root@ARM-DEV test]# arm-linux-gcc -c first.c -I
/arm-linux/include
>>        [root@ARM-DEV test]# arm-linux-ld  first.o -L /arm-linux/lib/
>>        arm-linux-ld: warning: cannot find entry symbol _start;
defaulting to
>>00008074
>>        first.o: In function `main':
>>        first.o(.text+0x10): undefined reference to `printf'
By adding the include path "-I /arm-linux/include" to the gcc call you
fixed your first problem.
To use "pintf" you need to link against libc by using -lc within your
linker command line call.
As the default entry point for startup the symbol "_start" is used. You can
tell the linker to use another entry point by adding "-e <name of entry
point>" (i.e. -e main). But usually you have to do initial setup of your
system
(i.e setup stack, etc.) before you do the call to main.
I never used a arm cpu, so i dont't no what the minimal initial setup for
this cpu is.
But i guess there is at least one guy within this list who can support you
with cpu specific informations, initial startup code, linker script, etc. .
Maybe the linux arm specific source code is another way to get the
necessary informations.
I hope it helps.


Regards Mathias



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


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