Linker fix for initialized global variables

I found that in some cases, initialized global variables don't work with user libraries, so a little change to the linker that I use, taken from the demo file, seems to solve the problem . I think that make more sense to put the global variables in sram and initial values in the main_ram, similar to the bios linker.
This commit is contained in:
Camilo Andres Vera Ruiz 2021-09-13 00:44:30 -05:00 committed by GitHub
parent e0e9311ceb
commit a235eaf0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ SECTIONS
*(.sdata .sdata.* .gnu.linkonce.s.*) *(.sdata .sdata.* .gnu.linkonce.s.*)
. = ALIGN(8); . = ALIGN(8);
_edata = .; _edata = .;
} > main_ram } > sram AT > main_ram
.bss : .bss :
{ {