mirror of
https://github.com/golang/go.git
synced 2026-01-29 23:22:06 +03:00
cmd/link: deal with no constructors
Change-Id: I6ed153b780c70fa90822e4daa5749478ac43afca Reviewed-on: https://go-review.googlesource.com/c/go/+/312034 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
@@ -607,6 +607,10 @@ dwarfLoop:
|
||||
Errorf(nil, "emitRelocations: could not find %q section", sect.Name)
|
||||
}
|
||||
|
||||
if f.ctorsSect == nil {
|
||||
return
|
||||
}
|
||||
|
||||
f.ctorsSect.emitRelocations(ctxt.Out, func() int {
|
||||
dottext := ldr.Lookup(".text", 0)
|
||||
ctxt.Out.Write32(0)
|
||||
|
||||
Reference in New Issue
Block a user