2014-10-27 15:27:03 -06:00
|
|
|
#include "textflag.h"
|
2014-08-12 17:48:49 -06:00
|
|
|
|
|
|
|
// actually a function descriptor for _main<>(SB)
|
2014-12-05 17:13:20 -07:00
|
|
|
TEXT _rt0_ppc64_linux(SB),NOSPLIT,$0
|
2014-08-12 17:48:49 -06:00
|
|
|
DWORD $_main<>(SB)
|
|
|
|
DWORD $0
|
|
|
|
DWORD $0
|
|
|
|
|
|
|
|
TEXT _main<>(SB),NOSPLIT,$-8
|
2014-12-16 16:34:55 -07:00
|
|
|
// In a statically linked binary, the stack contains argc,
|
|
|
|
// argv as argc string pointers followed by a NULL, envv as a
|
|
|
|
// sequence of string pointers followed by a NULL, and auxv.
|
|
|
|
// There is no TLS base pointer.
|
|
|
|
//
|
|
|
|
// TODO(austin): Support ABI v1 dynamic linking entry point
|
2014-08-12 17:48:49 -06:00
|
|
|
MOVD 0(R1), R3 // argc
|
|
|
|
ADD $8, R1, R4 // argv
|
|
|
|
BR main(SB)
|
|
|
|
|
|
|
|
TEXT main(SB),NOSPLIT,$-8
|
2014-10-27 15:27:03 -06:00
|
|
|
MOVD $runtime·rt0_go(SB), R31
|
2014-08-12 17:48:49 -06:00
|
|
|
MOVD R31, CTR
|
|
|
|
BR (CTR)
|