]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/link/internal/ld/main.go
[dev.regabi] all: merge master (dab3e5a) into dev.regabi
[gostls13.git] / src / cmd / link / internal / ld / main.go
index 133308e5f4dae105ac6c1c08d93d0af354718684..cbd811846b6ffae60d9c3dbd528a549bc431cea0 100644 (file)
@@ -182,6 +182,14 @@ func Main(arch *sys.Arch, theArch Arch) {
 
        interpreter = *flagInterpreter
 
+       if *flagBuildid == "" && ctxt.Target.IsOpenbsd() {
+               // TODO(jsing): Remove once direct syscalls are no longer in use.
+               // OpenBSD 6.7 onwards will not permit direct syscalls from a
+               // dynamically linked binary unless it identifies the binary
+               // contains a .note.go.buildid ELF note. See issue #36435.
+               *flagBuildid = "go-openbsd"
+       }
+
        // enable benchmarking
        var bench *benchmark.Metrics
        if len(*benchmarkFlag) != 0 {
@@ -329,6 +337,8 @@ func Main(arch *sys.Arch, theArch Arch) {
        bench.Start("Asmb")
        asmb(ctxt)
 
+       exitIfErrors()
+
        // Generate additional symbols for the native symbol table just prior
        // to code generation.
        bench.Start("GenSymsLate")