runtime: fix external address declarations

This is the same problem as in
https://github.com/tinygo-org/tinygo/pull/605, but other targets also
suffer from it.

Discovered with the GBA target, but as pointed out in
https://bugs.llvm.org/show_bug.cgi?id=42881#c1 this appears to be a bug
in the way external globals are declared, not in LLVM. Therefore I
decided that fixing it everywhere would be the best thing to do.
This commit is contained in:
Ayke van Laethem
2020-01-26 19:46:02 +01:00
committed by Ron Evans
parent 94fec09b31
commit 960ab3fca4
5 changed files with 21 additions and 21 deletions
+5 -5
View File
@@ -7,19 +7,19 @@ import (
)
//go:extern _heap_start
var heapStartSymbol unsafe.Pointer
var heapStartSymbol [0]byte
//go:extern _heap_end
var heapEndSymbol unsafe.Pointer
var heapEndSymbol [0]byte
//go:extern _globals_start
var globalsStartSymbol unsafe.Pointer
var globalsStartSymbol [0]byte
//go:extern _globals_end
var globalsEndSymbol unsafe.Pointer
var globalsEndSymbol [0]byte
//go:extern _stack_top
var stackTopSymbol unsafe.Pointer
var stackTopSymbol [0]byte
var (
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))