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.
Этот коммит содержится в:
родитель
fd6b671494
коммит
92206558fb
1 изменённых файлов: 8 добавлений и 0 удалений
|
@ -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/ */
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче