]> 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>
Fri, 4 Sep 2015 05:25:10 +0000 (05:25 +0000)
commit2c2cbb69c8dad1325f0a4b289417da73fd90f4b0
tree1c2c56c4895538fa8bac8ce67dc88bca27f06b53
parenteaea5ade2b5f60c6dfd72a08c9243e1651778332
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.

Fixes #10914
Updates #9210

Change-Id: I7178daadc0ae87953d5a084aa3d580f4e3b46d47
Reviewed-on: https://go-review.googlesource.com/10300
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