diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-10-11 15:48:22 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-10-14 00:19:23 +0000 |
commit | f46a5b1e4559191363dbd4f510105dd31ae97aaa (patch) | |
tree | 53e0d36ea873bb13f61041366827d508825e5564 /misc | |
parent | c8eea1633e160d3517ea44e50898893dad09fed0 (diff) | |
download | go-f46a5b1e4559191363dbd4f510105dd31ae97aaa.tar.gz go-f46a5b1e4559191363dbd4f510105dd31ae97aaa.zip |
cmd/link: support PIE internal linking on darwin/amd64
This CL adds support of PIE internal linking on darwin/amd64.
This is also preparation for supporting internal linking on
darwin/arm64 (macOS), which requires PIE for everything.
Updates #38485.
Change-Id: I2ed58583dcc102f5e0521982491fc7ba6f2754ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/261642
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/test/issue4029.c | 1 | ||||
-rw-r--r-- | misc/cgo/test/issue4029.go | 4 | ||||
-rw-r--r-- | misc/cgo/test/issue4029w.go | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/misc/cgo/test/issue4029.c b/misc/cgo/test/issue4029.c index 30646ade021..e6a777fe646 100644 --- a/misc/cgo/test/issue4029.c +++ b/misc/cgo/test/issue4029.c @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // +build !windows,!static +// +build !darwin !internal_pie #include <stdint.h> #include <dlfcn.h> diff --git a/misc/cgo/test/issue4029.go b/misc/cgo/test/issue4029.go index 1bf029d760a..8602ce19e2d 100644 --- a/misc/cgo/test/issue4029.go +++ b/misc/cgo/test/issue4029.go @@ -3,6 +3,10 @@ // license that can be found in the LICENSE file. // +build !windows,!static +// +build !darwin !internal_pie + +// Excluded in darwin internal linking PIE mode, as dynamic export is not +// supported. package cgotest diff --git a/misc/cgo/test/issue4029w.go b/misc/cgo/test/issue4029w.go index eee33f70101..de0cf2138ae 100644 --- a/misc/cgo/test/issue4029w.go +++ b/misc/cgo/test/issue4029w.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build windows static +// +build windows static darwin,internal_pie package cgotest |