File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 77 add s0, sp, zero
88
99 la gp, __global_pointer$
10+
11+ # Initialize .data
12+ # https://sourceware.org/binutils/docs/ld/Output-Section-LMA.html#Output-Section-LMA
13+ la t0, __sidata
14+ la t1, __sdata
15+ la t2, __edata
16+ load_data:
17+ bgeu t1, t2, data_done
18+ lb t3, 0 (t0)
19+ sb t3, 0 (t1)
20+ addi t0, t0, 1
21+ addi t1, t1, 1
22+ j load_data
23+ data_done:
1024
1125 # Clear BSS section
1226 la t0, __sbss
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ MEMORY {
1717}
1818
1919REGION_ALIAS (" REGION_TEXT" , rom);
20- REGION_ALIAS (" REGION_RODATA" , ram );
20+ REGION_ALIAS (" REGION_RODATA" , rom );
2121REGION_ALIAS (" REGION_DATA" , ram);
2222REGION_ALIAS (" REGION_BSS" , ram);
2323REGION_ALIAS (" REGION_HEAP" , ram);
You can’t perform that action at this time.
0 commit comments