]> Cypherpunks repositories - gostls13.git/commit
cmd: linker changes for shared library initialization
authorSrdjan Petrovic <spetrovic@google.com>
Tue, 17 Mar 2015 16:47:01 +0000 (09:47 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 27 Mar 2015 22:52:10 +0000 (22:52 +0000)
commit8da54a4eec860b2b96d43abe3a40f1c08edb6493
tree77c6a22d9cf7875fe7ad503a2874bd8969c16079
parentff1f3a11e4f1b0eee87225aec1aaaf2e74972ae0
cmd: linker changes for shared library initialization

Suggested by iant@, this change:
  - looks for a symbol _rt0_<GOARCH>_<GOOS>_lib,
  - if the symbol is present, adds a new entry into the .init_array ELF
    section that points to the symbol.

The end-effect is that the symbol _rt0_<GOARCH>_<GOOS>_lib will be
invoked as soon as the (ELF) shared library is loaded, which will in turn
initialize the runtime. (To be implemented.)

Change-Id: I99911a180215a6df18f8a18483d12b9b497b48f4
Reviewed-on: https://go-review.googlesource.com/7692
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/internal/ld/data.go
src/cmd/internal/ld/lib.go
src/runtime/rt0_linux_amd64.s