mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 18:47:47 +00:00
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:
committed by
Ayke van Laethem
parent
fd6b671494
commit
92206558fb
@@ -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/ */
|
||||
|
||||
Reference in New Issue
Block a user