mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 15:03:41 +00:00
windows: scan globals conservatively
Scan globals conservatively by reading writable sections from the PE header. I'd like to get rid of needing to precisely scan globals eventually, and this brings us one step closer. It also avoids a bug with ThinLTO on Windows.
This commit is contained in:
committed by
Ron Evans
parent
b52310fed2
commit
5404c81ffd
@@ -11,6 +11,8 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const gcAsserts = false // perform sanity checks
|
||||
|
||||
func alloc(size uintptr, layout unsafe.Pointer) unsafe.Pointer
|
||||
|
||||
func realloc(ptr unsafe.Pointer, size uintptr) unsafe.Pointer
|
||||
@@ -38,3 +40,7 @@ func initHeap() {
|
||||
func setHeapEnd(newHeapEnd uintptr) {
|
||||
// Nothing to do here, this function is never actually called.
|
||||
}
|
||||
|
||||
func markRoots(start, end uintptr) {
|
||||
// dummy, so that markGlobals will compile
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user