firmware: give satman whole RAM in linker script

This commit is contained in:
Sebastien Bourdeauducq 2017-01-19 17:12:27 -06:00
parent aa3af4f72d
commit f7dec72f02
1 changed files with 13 additions and 18 deletions

View File

@ -4,13 +4,6 @@ ENTRY(_start)
INCLUDE generated/regions.ld INCLUDE generated/regions.ld
/* Assume ORIGIN(main_ram) = 0x40000000. Unfortunately,
* ld does not allow this expression here.
*/
MEMORY {
runtime (RWX) : ORIGIN = 0x40000000, LENGTH = 0x400000 /* 4M */
}
SECTIONS SECTIONS
{ {
.text : .text :
@ -18,17 +11,19 @@ SECTIONS
_ftext = .; _ftext = .;
*(.text .stub .text.* .gnu.linkonce.t.*) *(.text .stub .text.* .gnu.linkonce.t.*)
_etext = .; _etext = .;
} > runtime } > main_ram
/* https://sourceware.org/bugzilla/show_bug.cgi?id=20475 */ /* https://sourceware.org/bugzilla/show_bug.cgi?id=20475 */
.got : { .got :
{
_GLOBAL_OFFSET_TABLE_ = .; _GLOBAL_OFFSET_TABLE_ = .;
*(.got) *(.got)
} > runtime } > main_ram
.got.plt : { .got.plt :
{
*(.got.plt) *(.got.plt)
} > runtime } > main_ram
.rodata : .rodata :
{ {
@ -37,7 +32,7 @@ SECTIONS
*(.rodata .rodata.* .gnu.linkonce.r.*) *(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1) *(.rodata1)
_erodata = .; _erodata = .;
} > runtime } > main_ram
.data : .data :
{ {
@ -47,7 +42,7 @@ SECTIONS
*(.data1) *(.data1)
*(.sdata .sdata.* .gnu.linkonce.s.*) *(.sdata .sdata.* .gnu.linkonce.s.*)
_edata = .; _edata = .;
} > runtime } > main_ram
.bss : .bss :
{ {
@ -61,7 +56,7 @@ SECTIONS
*(COMMON) *(COMMON)
. = ALIGN(4); . = ALIGN(4);
_ebss = .; _ebss = .;
} > runtime } > main_ram
.stack : .stack :
{ {
@ -69,14 +64,14 @@ SECTIONS
_estack = .; _estack = .;
. += 0x4000; . += 0x4000;
_fstack = . - 4; _fstack = . - 4;
} > runtime } > main_ram
.heap : .heap :
{ {
_fheap = .; _fheap = .;
. = ORIGIN(runtime) + LENGTH(runtime); . = ORIGIN(main_ram) + LENGTH(main_ram);
_eheap = .; _eheap = .;
} > runtime } > main_ram
/DISCARD/ : /DISCARD/ :
{ {