File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 99/* Loaders like to put stuff in low memory (< 1M), so we don't use it. */
1010ram_min = 1M;
1111ram_max = 2M;
12- /* Our stack grows down from ram_max. TODO: Add a guard for stack overflows. */
13- stack_size = 64K;
1412
1513SECTIONS
1614{
@@ -28,16 +26,17 @@ SECTIONS
2826 .data : { *(.data .data .*) }
2927 data_size = . - data_start;
3028
31- /* The BSS section isn't mapped from any file data. It is simply zeroed
32- in RAM. So our file size should be computed from here. */
33- file_size = . - ram_min;
29+ /* The BSS section isn't mapped from file data. It is just zeroed in RAM. */
3430 .bss : {
3531 bss_start = .;
3632 *(.bss .bss .*)
3733 bss_size = . - bss_start;
3834 }
3935
40- ASSERT ((. <= ram_max - stack_size), " firmware size too big for RAM region" )
36+ /* Our stack grows down from ram_max. TODO: Add stack overflow guards. */
37+ stack_size = 64K;
38+ . = ram_max - stack_size;
39+ .stack (NOLOAD) : { . += stack_size; } :NONE
4140
4241 /* Match edk2's GccBase.lds DISCARD section */
4342 /DISCARD/ : {
You can’t perform that action at this time.
0 commit comments