**
** ppc.library emulation
** (c)1998-2001 Frank Wille <frank@phoenix.owl.de>
**
** ELF LoadSeg Patch. Direct start of ELF objects.
**
** V0.5  (23.01.1999) phx
**       Created.
**       Parts are taken from ElfLoadSeg.c by Ralph Schmidt, Phase 5 1998.
**

	xdef	_SegmentCode
	xdef	_SegmentCode_Object
	xdef	_SegmentCode_ID
	xdef	_SegmentCode_End
	xref	_RunELF


	section	CODE,code

_SegmentCode:
; a0 = CmdLine
_SegmentCode_Object:
	move.l	#$12345678,a1
; a0 = CmdLine
; a1 = ELFObject
	move.l	a2,-(sp)
	lea	destroychksum(pc),a2
	addq.l	#1,(a2)
	move.l	(sp)+,a2
	jmp	_RunELF

destroychksum:
	dc.l	0

_SegmentCode_ID:
	dc.b	"_ELFHUNKID_",0
	cnop	0,4
_SegmentCode_End:
