Thanks much Paul -- that did the trick! (Well, almost.) For the benefit of other ADS/RVCT users that try this, here is what I did:
- figured out the file offset of the executable region in the axf file (readelf -l foo.axf|grep LOAD). For me, the offset appears to always be 0x34, and the executable region starts at 0x8000. - linked the application with armlink --ro-base 0x8034. This will move the executable region to a new start which is page-aligned to the actual file offset. - finally (this took me a little to figure out), I made sure that the executable has execute permissions: chmod u+rx foo.axf. With these changes, I could execute ARM/RealView Developer Suite generated executables directly. This is excellent -- thanks much to all who contributed to make this possible! The one remaining issue is that command line parameters are not properly transfered over to the ARM executable. This surprises me a little, since this does work for arm-userspace-linux, and the mechanisms loading the image appear quite similar. Where would I (start to) look for the reasons behind this? Is this something that needs to be "fixed" on the ARM side (i.e. fix the location where the ARM code looks for the environment)? - Wolfgang Paul Brook <[EMAIL PROTECTED]> wrote on 12.06.2006 16:18:34: > On Monday 12 June 2006 15:09, Wolfgang Schildbach wrote: > > Hi Paul, > > > > Does this mean that qemu-arm should be able to run the binaries that are > > produced by RVCT? I am trying to run a simple helloworld, compiled and > > linked with rvct2.2 (armcc -g -o hello hello.c) into a "ELF 32-bit LSB > > executable, ARM, version 1 (SYSV), statically linked, not stripped" file, > > but qemu-arm fails with an "error loading ./hello". > > Yes it should be able to run RVCT binaries. The problem is that the qemu > loader assumes the LMA and file offsets be page aligned (ie. be the same > modulo the page size). This is part of the ABI for linux executables so that > the binary can be mmapped directly into memory. RVCT does not enforce this > alignment by default. > > > On a related note, how do I go about debugging qemu (namely the part that > > loads executables)? Since qemu appears as a shared object, this is not so > > straightforward. When I start gdb on arm-user, set a breakpoint at main() > > and type "run", I get > > Configure with --static. > > Paul -- Wolfgang Schildbach, Senior Research Engineer Coding Technologies GmbH _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel