]> Cypherpunks repositories - gostls13.git/commit
runtime: darwin/amd64 library entry point
authorDavid Crawshaw <crawshaw@golang.org>
Wed, 8 Apr 2015 18:16:26 +0000 (14:16 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Wed, 8 Apr 2015 21:53:52 +0000 (21:53 +0000)
commitb0a85f5d93c3f0f5a53f09cdef1bdb72bfa313de
treeba8ee33856ec43c4a6c99d1f4cd1089bc12fb1db
parent2a5f88d85072b30549c348a04e710fa26629e44b
runtime: darwin/amd64 library entry point

This is a practice run for darwin/arm.

Similar to the linux/amd64 shared library entry point. With several
pending linker changes I am successfully using this to implement
-buildmode=c-archive on darwin/amd64 with external linking.

The same entry point can be reused to implement -buildmode=c-shared
on darwin/amd64, however that will require further ld changes to
remove all text relocations.

One extra runtime change will follow this. According to the Go
execution modes document, -buildmode=c-archive should ignore the Go
main function. Right now it is being executed (and the process exits
if it doesn't block). I'm still searching for the right way to do
this.

Change-Id: Id97901ddd4d46970996f222bd79731dabff66a3d
Reviewed-on: https://go-review.googlesource.com/8652
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/os1_darwin.go
src/runtime/os_darwin.go
src/runtime/rt0_darwin_amd64.s
src/runtime/sys_darwin_amd64.s