mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
nintendoswitch: Add env parser and removed unused stuff
* Heap allocation based on available ram * Added homebrew launcher parser (for overriden heap) * Removed unused stuff (moved to gonx) * Kept require code at minimum to work in a real device * Moved everything to a single file
This commit is contained in:
@@ -59,8 +59,15 @@ func dynamicLoader(base uintptr, dyn *dyn64) {
|
||||
for relasz > 0 && rela != nil {
|
||||
switch rela.Info {
|
||||
case rAARCH64_RELATIVE:
|
||||
if debugLoader {
|
||||
println("relocating ", uintptr(rela.Addend), " to ", base+uintptr(rela.Addend))
|
||||
}
|
||||
ptr := (*uint64)(unsafe.Pointer(base + uintptr(rela.Off)))
|
||||
*ptr = uint64(base + uintptr(rela.Addend))
|
||||
default:
|
||||
if debugLoader {
|
||||
println("unknown section to load:", rela.Info)
|
||||
}
|
||||
}
|
||||
|
||||
rptr := uintptr(unsafe.Pointer(rela))
|
||||
|
||||
Reference in New Issue
Block a user