#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
#if defined(__PPC__)

	.section .text

	.globl	_start
	.type	_start, @function
_start:
	mr	%r5, %r1
	rlwinm	%r1, %r1, 0, 0, 27	/* sp &= 0xfffffff0 */

	lwz	%r3, 0(%r5)	/* argc */
	addi	%r4, %r5, 4	/* argv */
	addi	%r5, %r3, 1
	rlwinm	%r5, %r5, 2, 0, 29	/* r5 <<= 2 */
	add	%r5, %r4, %r5	/* envp */

	bl	nlcrt_start

1:	b	1b
#endif
#endif
