I am trying to run arm executable using qemu and I am getting this following error
a.out: Invalid ELF image for this architecture.
My assemble code
.text .global _start _start: mov r0, #1 ldr r1, =message ldr r2, =len mov r7, #4 swi 0 mov r7, #7 swi 0 .data message: .asciz "Hello, World\n" len = .-message
I am compiling with the command
arm-linux-gnueabihf-as hello.s and
file a.out output is
a.out: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
When I run using command
qemu-arm a.out, I am getting the following output
a.out: Invalid ELF image for this architecture
I need help on what went wrong.