Skip to content

Commit

Permalink
[simple-system] Add missing linker sections
Browse files Browse the repository at this point in the history
Adding the "small" sections to the example linker script. This ensures
that all sections of memory needing to be zeroed are captured.

Fixes lowRISC#1092

Signed-off-by: Tom Roberts <[email protected]>
  • Loading branch information
Tom Roberts authored and tomeroberts committed Sep 23, 2020
1 parent f9f0cb1 commit 2cb1efb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/sw/simple_system/common/link.ld
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,18 @@ SECTIONS

.rodata : {
. = ALIGN(4);
/* Small RO data before large RO data */
*(.srodata)
*(.srodata.*)
*(.rodata);
*(.rodata.*)
} > ram

.data : {
. = ALIGN(4);
/* Small data before large data */
*(.sdata)
*(.sdata.*)
*(.data);
*(.data.*)
} > ram
Expand All @@ -61,6 +67,9 @@ SECTIONS
{
. = ALIGN(4);
_bss_start = .;
/* Small BSS before large BSS */
*(.sbss)
*(.sbss.*)
*(.bss)
*(.bss.*)
*(COMMON)
Expand Down

0 comments on commit 2cb1efb

Please sign in to comment.