]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/ld: put read-only relocated data into .data.rel.ro when making a shared...
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Thu, 21 May 2015 01:07:19 +0000 (13:07 +1200)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Tue, 8 Sep 2015 23:34:16 +0000 (23:34 +0000)
commit5cbca8d84ba4625893c3a0b28a279d664b4125ec
treec7bd46e33fa12788c77999704ff9b96238485eca
parent14f919578d671a3e34431e1834c2820f9c6e3d0d
cmd/internal/ld: put read-only relocated data into .data.rel.ro when making a shared object

Currently Go produces shared libraries that cannot be shared between processes
because they have relocations against the text segment (not text section). This
fixes this by moving some data to sections with magic names recognized by the
static linker.

The change in genasmsym to add STYPELINK to the switch should fix things on
darwin/arm64.

Fixes #10914
Updates #9210

Change-Id: Iab4a6678dd04cec6114e683caac5cf31b1063309
Reviewed-on: https://go-review.googlesource.com/14306
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
13 files changed:
misc/cgo/testcshared/test.bash
misc/cgo/testshared/shared_test.go
src/cmd/internal/obj/link.go
src/cmd/link/internal/ld/data.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/symtab.go
src/cmd/newlink/testdata/autosection.6
src/cmd/newlink/testdata/autoweak.6
src/cmd/newlink/testdata/dead.6
src/cmd/newlink/testdata/hello.6
src/cmd/newlink/testdata/layout.6
src/cmd/newlink/testdata/pclntab.6