fusee_cpp: validate mtc overlay before jumping to it.

mtc will jump back to us, so we need a compatible binary.

This also makes some changes to our layout to minimize the likelihood of
an incompatible mtc binary (I made some arbitrary .text/.rodata/.rwdata changes)
and saw identical mtc binaries, so hopefully this all works out.
This commit is contained in:
Michael Scire 2021-09-03 01:49:18 -07:00 committed by SciresM
parent b520f5c53b
commit 5950ff5b5e
4 changed files with 24 additions and 5 deletions

View file

@ -23,6 +23,9 @@ SECTIONS
KEEP(*(.text._ZN3ams4util15GetMicroSecondsEv))
KEEP(*(.text._ZN3ams4util16WaitMicroSecondsEi))
KEEP(*(.text._ZN3ams6nxboot14ShowFatalErrorEPKcz))
KEEP(*(.text.memcpy))
KEEP(*(.text.memset))
KEEP(*(.text.memcmp))
_*.o(SORT(.text*))
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
*(.text.exit .text.exit.*)