lang/go: work around xonly issue on arm64 and presumably riscv64 by

passing -Wl,--no-execute-only. The underlying issue has not yet been
identified, but there's quite a bit of breakage in all non-trivial
Go programs that I tested.

with help of jsing, "i think you should commit this" deraadt
This commit is contained in:
tb 2023-01-05 18:30:43 +00:00
parent 71486e1025
commit bf9ec668d5
2 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,7 @@ VERSION = 1.19.4
DISTNAME = go${VERSION}.src
PKGNAME = go-${VERSION}
PKGSPEC = ${FULLPKGNAME:S/go-/go-=/}
REVISION = 0
REVISION = 1
CATEGORIES = lang

View File

@ -22,3 +22,11 @@ Index: src/cmd/link/internal/ld/lib.go
GenSymsLate func(*Link, *loader.Loader)
// TLSIEtoLE converts a TLS Initial Executable relocation to
@@ -1339,6 +1342,7 @@ func (ctxt *Link) hostlink() {
}
case objabi.Hopenbsd:
argv = append(argv, "-Wl,-nopie")
+ argv = append(argv, "-Wl,--no-execute-only")
argv = append(argv, "-pthread")
case objabi.Hwindows:
if windowsgui {