This is the mail archive of the
sid@sources.redhat.com
mailing list for the SID project.
Re: Running the hello.c example
- From: Ben Elliston <bje at redhat dot com>
- To: Cristiano Ligieri Pereira <cpereira at ics dot uci dot edu>
- Cc: sid at sources dot redhat dot com
- Date: Mon, 19 Nov 2001 08:22:37 +1100 (EST)
- Subject: Re: Running the hello.c example
- References: <Pine.SOL.4.20.0111181056060.10134-100000@washoe.ics.uci.edu>
>>>>> "Cristiano" == Cristiano Ligieri Pereira <cpereira@ics.uci.edu> writes:
Cristiano> % arm-elf-gcc -EL hello.c -o hello.x
Cristiano> arm-elf-gcc: unrecognized option `-EL'
Cristiano> /tools/H-i686-pc-linux-gnu/arm-elf/bin/ld: cannot open crt0.o: No such
Cristiano> file or directory
Cristiano> collect2: ld returned 1 exit status
I'm not sure why this is happening; are you sure that -EL is the
right command line option to build a little endian ARM binary? I'm
not so sure. You should check the documentation.
Cristiano> % arm-elf-gcc -I/usr/include -E hello.c -o hello.x
Cristiano> it works fine and generate the hello.x file, which is post-preprocessing
Cristiano> version of the file hello.c (which I thought it was weird since as far as
Cristiano> I understood I need the executatble version, isn't it?).
Cristiano> Anyways, It turns out to does not work. When trying arm-elf-sid I get the
Cristiano> following:
Cristiano> % arm-elf-sid hello.x
Cristiano> loader: error loading hello.x
This won't work -- you've emitted preprocessed source to hello.x.
hello.x needs to be a valid ELF object file (you can test this with
file(1) when you think you've got it right).
Ben