This is the mail archive of the sid@sources.redhat.com mailing list for the SID 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: Running the hello.c example


>>>>> "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


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