On Wed, Jan 26, 2011 at 16:21, riku voipio wrote:
> On 01/24/2011 11:48 AM, Mike Frysinger wrote:
>> This brings flatload.c more in line with the current Linux FLAT loader
>> which allows targets to handle FLAT relocations in their own way.  For
>> the common behavior, the new functions get stubbed out.
>
> Do you have some instructions howto build flat binaries for testing? I have
> to admit my knowledge of flat binaries is quite nonexisting.

you would need to get a toolchain that specifically supports it.  a
simple binutils/gcc cross-compiler wont work because you need the
external "elf2flt" package integrated, and doing so is non-trivial.

personally, ive never used ARM/nommu, but i believe you want this toolchain:
http://www.codesourcery.com/sgpp/lite/arm/portal/release1588
and then simply compiling a simple app like:
  main(){puts("hello");}
should produce a FLAT file you can run.

this is how you do it for a Blackfin FLAT, and i imagine the ARM
method is the same:
$ echo 'main(){puts("hello");}' > test.c
$ bfin-uclinux-gcc test.c
$ file a.out
a.out: BFLT executable - version 4 ram
$ qemu-bfin ./a.out
hello
-mike

Reply via email to