mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
9f7079c44e
commit
41e5ae4883
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue