Dig yourself a hole and everything starts with "Hello world".
Hello. S
.datamsg: .ascii "Hello, World!\n" len = . - msg.text.globl _start_start: /* syscall write (int fd, const void *buf, size_t count) */ mov %r0, $1 /* fd -> stdout */ ldr %r1, =msg /* buf - > msg */ ldr %r2, =len /* count -> len (msg)  */    MOV     %R7, $4 /* write is syscall #4 */ swi $0 /* invoke syscall */ &Nbsp; /* syscall exit (Int status) */ Mov %r0, $0 /* status -> 0 */ mov %r7, $1 /* exit is syscall #1 */ swi $0 /* invoke syscall */
Arm-linux-androideabi-as-o hello.o Hello. S
Arm-linux-androideabi-ld-s-O Hello hello.o
ADB push Hello/data/local/tmp/hello
ADB Shell/data/local/tmp/hello
This article is from the "Easy Cold" blog, please be sure to keep this source http://fjyihan.blog.51cto.com/2767207/1540181