Allocate .sbss and .common into .bss
GNU ld fragments .bss into .sbss and .common (see man nm(1) for further reference). However, the linker script used by PSXSDK did not determine where to put such sections, causing some statically allocated objects to be placed **after** __bss_end, leading to undefined behaviour.
This commit is contained in:
parent
ad890e56b6
commit
89b059cace
|
@ -50,6 +50,13 @@ SECTIONS
|
|||
.bss ALIGN(4) :
|
||||
{
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
*(.sbss)
|
||||
*(.sbss.*)
|
||||
*(.gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
}
|
||||
|
||||
__text_start = ADDR(.text);
|
||||
|
|
Loading…
Reference in New Issue