scc

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

crt-posix.s (232B)


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