diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-11-07 15:43:30 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-11-07 16:02:54 +0100 |
| commit | 89b059cace59a2c6dd8d4920b02cac75053a37db (patch) | |
| tree | d380bd51c6e3b60402c5d15211c1f194839b1e16 | |
| parent | ad890e56b63225aaa601ddacf7cb21cab18e233e (diff) | |
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.
| -rwxr-xr-x | misc/genscripts.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/genscripts.sh b/misc/genscripts.sh index 755bca4..5fafa33 100755 --- a/misc/genscripts.sh +++ b/misc/genscripts.sh @@ -50,6 +50,13 @@ SECTIONS .bss ALIGN(4) : { *(.bss) + *(.bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + *(.sbss) + *(.sbss.*) + *(.gnu.linkonce.sb.*) + *(.scommon) } __text_start = ADDR(.text); |
