• Srdjan Petrovic's avatar
    runtime: initialize shared library at library-load time · e8694c81
    Srdjan Petrovic authored
    This is Part 2 of the change, see Part 1 here: in https://go-review.googlesource.com/#/c/7692/
    
    Suggested by iant@, we use the library initialization entry point to:
        - create a new OS thread and run the "regular" runtime init stack on
          that thread
        - return immediately from the main (i.e., loader) thread
        - at the first CGO invocation, we wait for the runtime initialization
          to complete.
    
    The above mechanism is implemented only on linux_amd64.  Next step is to
    support it on linux_arm.  Other platforms don't yet support shared library
    compiling/linking, but we intend to use the same strategy there as well.
    
    Change-Id: Ib2c81b1b83bee837134084b75a3beecfb8de6bf4
    Reviewed-on: https://go-review.googlesource.com/8094
    Run-TryBot: Srdjan Petrovic <spetrovic@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    e8694c81
Name
Last commit
Last update
..
asm_386.s Loading commit data...
asm_amd64.s Loading commit data...
asm_arm.s Loading commit data...
asm_nacl_amd64p32.s Loading commit data...
asm_ppc64x.s Loading commit data...
callbacks.go Loading commit data...
cgo.go Loading commit data...
dragonfly.go Loading commit data...
freebsd.go Loading commit data...
gcc_386.S Loading commit data...
gcc_amd64.S Loading commit data...
gcc_android.c Loading commit data...
gcc_android_arm.c Loading commit data...
gcc_arm.S Loading commit data...
gcc_darwin_386.c Loading commit data...
gcc_darwin_amd64.c Loading commit data...
gcc_darwin_arm.c Loading commit data...
gcc_dragonfly_amd64.c Loading commit data...
gcc_fatalf.c Loading commit data...
gcc_freebsd_386.c Loading commit data...
gcc_freebsd_amd64.c Loading commit data...
gcc_freebsd_arm.c Loading commit data...
gcc_libinit.c Loading commit data...
gcc_libinit_openbsd.c Loading commit data...
gcc_libinit_windows.c Loading commit data...
gcc_linux_386.c Loading commit data...
gcc_linux_amd64.c Loading commit data...
gcc_linux_arm.c Loading commit data...
gcc_linux_ppc64x.c Loading commit data...
gcc_netbsd_386.c Loading commit data...
gcc_netbsd_amd64.c Loading commit data...
gcc_netbsd_arm.c Loading commit data...
gcc_openbsd_386.c Loading commit data...
gcc_openbsd_amd64.c Loading commit data...
gcc_ppc64x.S Loading commit data...
gcc_setenv.c Loading commit data...
gcc_signal_darwin_armx.c Loading commit data...
gcc_signal_darwin_lldb.c Loading commit data...
gcc_util.c Loading commit data...
gcc_windows_386.c Loading commit data...
gcc_windows_amd64.c Loading commit data...
iscgo.go Loading commit data...
libcgo.h Loading commit data...
netbsd.go Loading commit data...
openbsd.go Loading commit data...
setenv.go Loading commit data...
signal_darwin_arm.s Loading commit data...
signal_darwin_armx.go Loading commit data...