mirror of git://gcc.gnu.org/git/gcc.git
runtime: set isarchive in initsig
The library initialization code in go-libmain.c sets the C variable
runtime_isarchive but failed to set the Go variable runtime.isarchive.
We don't currently have a way to let C code access an unexported Go
variable, but fortunately the only time the Go function initsig is
called with an argument of true is exactly where we want to set
isarchive. So let initsig do it.
Reviewed-on: https://go-review.googlesource.com/33753
From-SVN: r243094
This commit is contained in:
parent
974afa584b
commit
6e7f1be7ae
|
|
@ -1,4 +1,4 @@
|
|||
9be198d960e4bc46e21e4da1e3d4a1619266b8ab
|
||||
97b949f249515a61d3c09e9e06f08c8af189e967
|
||||
|
||||
The first line of this file holds the git revision number of the last
|
||||
merge done from the gofrontend repository.
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ var signalsOK bool
|
|||
//go:nosplit
|
||||
//go:nowritebarrierrec
|
||||
func initsig(preinit bool) {
|
||||
if preinit {
|
||||
// preinit is only passed as true if isarchive should be true.
|
||||
isarchive = true
|
||||
}
|
||||
|
||||
if !preinit {
|
||||
// It's now OK for signal handlers to run.
|
||||
signalsOK = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue