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:
parent
e0e9311ceb
commit
a235eaf0cd
|
@ -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 :
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue