mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: exit if runtime.a is missing
Many stages in the linker assume some runtime symbols exist. Error out if the runtime package cannot be found. Fixes #56685. Change-Id: I39b2663f6d7419688e30e6d8650e5eb8fc43a2b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/449638 Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
73f987c88b
commit
fffda6b3ad
1 changed files with 3 additions and 0 deletions
|
|
@ -466,6 +466,9 @@ func loadinternal(ctxt *Link, name string) *sym.Library {
|
|||
}
|
||||
}
|
||||
|
||||
if name == "runtime" {
|
||||
Exitf("error: unable to find runtime.a")
|
||||
}
|
||||
ctxt.Logf("warning: unable to find %s.a\n", name)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue