cmd/link: support C-shared buildmode on macOS/ARM64

It just works, after the plugin work.

Updates #38485.

Change-Id: I55aa11b380a33a729fccb731b77f48bc7d0dea2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/259443
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Cherry Zhang 2020-10-03 23:58:29 -04:00
parent 234de9e1c2
commit f8e554021b
3 changed files with 2 additions and 5 deletions

View file

@ -1329,9 +1329,6 @@ func (ctxt *Link) hostlink() {
case BuildModeCShared:
if ctxt.HeadType == objabi.Hdarwin {
argv = append(argv, "-dynamiclib")
if ctxt.Arch.Family != sys.AMD64 {
argv = append(argv, "-Wl,-read_only_relocs,suppress")
}
} else {
// ELF.
argv = append(argv, "-Wl,-Bsymbolic")