diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-03-07 22:17:50 +0100 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-03-07 22:17:50 +0100 |
| commit | 93f0a6d23ebed50833f565f949f351c2b80853ac (patch) | |
| tree | 4b6776e61dfe67955d0787251394b86bc8b72819 /libpsn00b/ldscripts | |
| parent | 6174931fe58b1dc0fc64029dbe3abefc81aa67d5 (diff) | |
| download | psn00bsdk-93f0a6d23ebed50833f565f949f351c2b80853ac.tar.gz | |
Fix critical ldscript bug and CI, add BIOS setjmp
Diffstat (limited to 'libpsn00b/ldscripts')
| -rw-r--r-- | libpsn00b/ldscripts/dll.ld | 1 | ||||
| -rw-r--r-- | libpsn00b/ldscripts/exe.ld | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libpsn00b/ldscripts/dll.ld b/libpsn00b/ldscripts/dll.ld index a03a504..15158e4 100644 --- a/libpsn00b/ldscripts/dll.ld +++ b/libpsn00b/ldscripts/dll.ld @@ -86,6 +86,7 @@ SECTIONS { * as we don't have to worry about managing .bss separately from the * main DLL blob. */ + . = ALIGN((. != 0) ? 4 : 1); __bss_start = .; *(.bss .bss.* .gnu.linkonce.b.*) diff --git a/libpsn00b/ldscripts/exe.ld b/libpsn00b/ldscripts/exe.ld index c6b9f29..583d76a 100644 --- a/libpsn00b/ldscripts/exe.ld +++ b/libpsn00b/ldscripts/exe.ld @@ -82,6 +82,11 @@ SECTIONS { /* BSS sections, i.e. uninitialized variables */ + /* + * Align all BSS sections to 4 bytes to ensure _start() doesn't perform + * unaligned memory accesses when clearing them. + */ + . = ALIGN((. != 0) ? 4 : 1); __bss_start = .; .sbss (NOLOAD) : { @@ -91,13 +96,9 @@ SECTIONS { .bss (NOLOAD) : { *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) - - /* - * This crap was in the stock GCC linker script. - */ - . = ALIGN((. != 0) ? 4 : 1); } > APP_RAM + . = ALIGN((. != 0) ? 4 : 1); _end = .; /* Dummy section */ |
