Closed DarkRTA closed 1 month ago
Trying some stuff with this PR and I think a few features aren't working properly. Specifically I tried building a CIA for a built-in title (Activity Log USA 0004001000021200), and it froze. Building the latest commit of the main repo (ad8b5e0a8c7c9d7dd590fb76a29fe5d6ab18e22f) and it works fine.
Is there a chance something else is using arm9 memory? Or is something just weird with my setup? I don't know what else could have broken.
Maybe related to lto? Because building the latest mainline commit without lto results in a crash:
I'd consider opening a separate issue for that. This reeks of UB.
Trying some stuff with this PR and I think a few features aren't working properly. Specifically I tried building a CIA for a built-in title (Activity Log USA 0004001000021200), and it froze. Building the latest commit of the main repo (ad8b5e0) and it works fine.
turns out the freeze here was actually the exception handler being broken due to a typo in the linker script. this has been fixed
Wolfvak has offered a much better solution than what is present here. Closing this.
This is needed to implement support for Lua. Lua is way to big to fit in a single contiguous section of memory without overwriting our copy of boot9 and boot11, so some clever linker manipulation was used to place things in the free space after it. LTO also had to be disabled as we won't be able to split
.text
later with it.This uses the following memory map:
This has been tested on actual hardware and seems to boot up and work fine.