diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 19678adbd56..9a5d89a6f7d 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -1463,12 +1463,12 @@ func (ctxt *Link) hostlink() { // We force all symbol resolution to be done at program startup // because lazy PLT resolution can use large amounts of stack at // times we cannot allow it to do so. - argv = append(argv, "-Wl,-znow") + argv = append(argv, "-Wl,-z,now") // Do not let the host linker generate COPY relocations. These // can move symbols out of sections that rely on stable offsets // from the beginning of the section (like sym.STYPE). - argv = append(argv, "-Wl,-znocopyreloc") + argv = append(argv, "-Wl,-z,nocopyreloc") if buildcfg.GOOS == "android" { // Use lld to avoid errors from default linker (issue #38838)