mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: use gold when dynamic linking on arm,arm64 only on Linux and Android
Fixes freebsd/arm build. Change-Id: Id9b1905a5335f86d317dab7514e0ce7cb74aba1d Reviewed-on: https://go-review.googlesource.com/c/go/+/193537 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
b4924870f4
commit
c78ac39ae9
1 changed files with 1 additions and 1 deletions
|
|
@ -1262,7 +1262,7 @@ func (ctxt *Link) hostlink() {
|
|||
// from the beginning of the section (like sym.STYPE).
|
||||
argv = append(argv, "-Wl,-znocopyreloc")
|
||||
|
||||
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) {
|
||||
if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && (objabi.GOOS == "linux" || objabi.GOOS == "android") {
|
||||
// On ARM, the GNU linker will generate COPY relocations
|
||||
// even with -znocopyreloc set.
|
||||
// https://sourceware.org/bugzilla/show_bug.cgi?id=19962
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue