jserv / mini-arm-os

Build a minimal multi-tasking OS kernel for ARM from scratch
Other
1.06k stars 243 forks source link

Carefully handle string literal with RAM #21

Closed ryanpatiency closed 6 years ago

ryanpatiency commented 6 years ago

This example copy flash to ram, however, string literal is in .text region rather than .data region. Because the linker script put the .rodata region under the text region.

jserv commented 6 years ago

You should mention in program comments as well. Mention its explicit considerations and specifications.

ryanpatiency commented 6 years ago

Already

jserv commented 6 years ago

Additional information about string literal allocation is required in C comment. Use git rebase -i to rework the commits.

ryanpatiency commented 6 years ago

I add the comment directly on the github, illustrate WHY the variable exist and the behavior about LMA and VMA.