Skip to content

Commit

Permalink
Restructure linker.ld and add heap, vm1, and vm2 regions
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwio committed Feb 24, 2019
1 parent 44d460f commit cc71806
Showing 1 changed file with 41 additions and 8 deletions.
49 changes: 41 additions & 8 deletions linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,54 @@ ENTRY(entry3)
SECTIONS
{
. = 0x80000000;
_stack_end = .;

.stack (NOLOAD): {
. = ALIGN(16);
_stack_end = .;
. = . + (16 * 1024);
. = ALIGN(16);
_stack_start = .;
. = . + 16K;
}

.text : {
_stack_start = .;
. = ALIGN(4K);
_rw_start = .;

.data : {
*(.data);
}

.bss : {
*(.bss);
}

. = ALIGN(4K);
_rw_end = .;
_exec_start = .;

.text : {
out/entry3.o(.text);
out/entry2.o(.text);
*(.text);
}

.data : { *(.data) }
.bss : { *(.bss) }
. = ALIGN(4K);
_exec_end = .;

. = ALIGN(2M);

_heap_start = .;
.heap (NOLOAD): {
. = . + 2M;
}
_heap_end = .;

_vm1_start = .;
.vm1 (NOLOAD): {
. = . + 2M;
}
_vm1_end = .;

_vm2_start = .;
.vm2 (NOLOAD): {
. = . + 2M;
}
_vm2_end = .;
}

0 comments on commit cc71806

Please sign in to comment.