scc

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

crt-posix.s (231B)


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