scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

crt-posix.s (237B)


      1 	.bss
      2 	.globl	_environ
      3 _environ:
      4 	.word	0
      5 
      6 	.text
      7 	.globl	_start
      8 _start:
      9 	ldr	r0,[sp]		/* argc */
     10 	add	r1,sp,#4	/* argv */
     11 	add	r2,r1,r0,lsl #2	/* argv = argc + 4*argc + 4 */
     12 	add	r2,r2,#4
     13 	ldr	r3,=_environ
     14 	str	r2,[r3]
     15 	bl	main
     16 	b	exit