cmd/go: -buildmode=c-shared should work on darwin/386

* Enable c-shared buildmode on darwin/386
* dyld does not support text relocation on i386. Add -read_only_relocs suppress flag to linker

Fixes #13904

Change-Id: I9adbd20d3f36ce9bbccf1bffb746b391780d088f
Reviewed-on: https://go-review.googlesource.com/18500
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Joe Sylve 2016-01-10 23:23:51 -06:00 committed by Russ Cox
parent 4206e9d343
commit 9efc46f1cb
4 changed files with 4 additions and 4 deletions

View file

@ -1068,7 +1068,7 @@ func hostlink() {
argv = append(argv, "-pie")
case BuildmodeCShared:
if HEADTYPE == obj.Hdarwin {
argv = append(argv, "-dynamiclib")
argv = append(argv, "-dynamiclib", "-Wl,-read_only_relocs,suppress")
} else {
// ELF.
argv = append(argv, "-Wl,-Bsymbolic")