gameboy-advance: don't crash copying unaligned strings

Strings are emitted in .rodata sections, which are not yet mentioned in the linker script.

I can't exactly explain why it didn't work before, as these sections should have been included in .bss and thus properly aligned, but it appears to work reliably.
This commit is contained in:
Kyle Lemons (Loon, LLC)
2019-08-04 18:11:24 -07:00
committed by Ayke van Laethem
parent fd6b671494
commit 92206558fb
+8
View File
@@ -21,6 +21,14 @@ SECTIONS
. = ALIGN(4);
} >rom
.rodata :
{
. = ALIGN(4);
*(.rodata)
*(.rodata*)
. = ALIGN(4);
} >rom
/* Put the stack at the bottom of RAM, so that the application will
* crash on stack overflow instead of silently corrupting memory.
* See: http://blog.japaric.io/stack-overflow-protection/ */