Skip to content

Commit

Permalink
fix(linker): Move _image_noload_start to before bss section
Browse files Browse the repository at this point in the history
Having this symbol right before the bss section (firs noload section)
allows easier calculations in the c code.

Signed-off-by: Miguel Silva <[email protected]>
  • Loading branch information
miguelafsilva5 committed Nov 29, 2024
1 parent da6b7aa commit 03e6dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ SECTIONS
KEEP(*(.vm_image*))
}
. = ALIGN(PAGE_SIZE);
_vm_image_end = .;
_image_noload_start = .;
_vm_image_end = .;
extra_allocated_phys_mem = _image_noload_start - _image_load_end;

#ifdef MEM_PROT_MMU
Expand All @@ -73,6 +72,7 @@ SECTIONS
#endif

/* Only no load regions below */
_image_noload_start = .;

.bss (NOLOAD) : {
_bss_start = .;
Expand Down

0 comments on commit 03e6dc4

Please sign in to comment.