#if defined(__linux__)
#if defined(__riscv) && !defined(__LP64__)

	.section .text

	.globl	_start
	.type	_start, @function
_start:
	mv	a2, sp
	li	a0, -16
	and	sp, sp, a0

	lui	gp, %hi(_gp)
	addi	gp, gp, %lo(_gp)

	lw	a0, 0(a2)	/* argc */
	addi	a1, a2, 4	/* argv */
	addi	a2, a0, 1
	slli	a2, a2, 2
	add	a2, a1, a2	/* envp */

	jal	nlcrt_start
	nop

1:	j	1b
	nop
#endif
#endif
