Home | History | Annotate | Download | only in runtime
      1 #include "textflag.h"
      2 
      3 // actually a function descriptor for _main<>(SB)
      4 TEXT _rt0_ppc64_linux(SB),NOSPLIT,$0
      5 	DWORD $_main<>(SB)
      6 	DWORD $0
      7 	DWORD $0
      8 
      9 TEXT _main<>(SB),NOSPLIT,$-8
     10 	// In a statically linked binary, the stack contains argc,
     11 	// argv as argc string pointers followed by a NULL, envv as a
     12 	// sequence of string pointers followed by a NULL, and auxv.
     13 	// There is no TLS base pointer.
     14 	//
     15 	// TODO(austin): Support ABI v1 dynamic linking entry point
     16 	MOVD 0(R1), R3 // argc
     17 	ADD $8, R1, R4 // argv
     18 	BR main(SB)
     19 
     20 TEXT main(SB),NOSPLIT,$-8
     21 	MOVD	$runtimert0_go(SB), R12
     22 	MOVD	R12, CTR
     23 	BR	(CTR)
     24