Merge pull request #1976 from SBird1337/ld/malloc

fix(linking): link gflib/malloc.c at top of EWRAM in ld_script_modern.ld
This commit is contained in:
GriffinR 2024-01-28 13:39:49 -05:00 committed by GitHub
commit f2276e14a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,11 @@ SECTIONS {
ewram 0x2000000 (NOLOAD) :
ALIGN(4)
{
/*
We link malloc.o here to prevent `gHeap` from landing in the middle of EWRAM.
Otherwise this causes corruption issues on some ld versions
*/
gflib/malloc.o(ewram_data);
src/*.o(ewram_data);
gflib/*.o(ewram_data);
} > EWRAM