github.com/sanprasirt/go@v0.0.0-20170607001320-a027466e4b6d/src/runtime/rt0_linux_ppc64.s (about)

     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	$runtime·rt0_go(SB), R12
    22  	MOVD	R12, CTR
    23  	BR	(CTR)