arm
-nographic
test.c
The QEMU emulator is written especially to emulate Linux guest systems; for this reason its startup procedure is implemented specifically: the -kernel option loads a binary file (usually a Linux kernel) inside the system memory starting at address 0x00010000. The emulator starts the execution at address 0x00000000, where few instructions (already in place) are used to jump at the beginning of the kernel image. The interrupt table of ARM cores, usually placed at address 0x00000000, is not present, and the peripheral interrupts are disabled at startup, as needed to boot a Linux kernel. Knowing this, to implement a working emulation I need to considerate a few things:
The software must be compiled and linked to be placed at 0x00010000
I need to create a binary image of our program
I can ignore interrupt handling for now
startup.s
test.ld
compile and linking
test
host gdb
出處:https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/