VladisM/m2tools

Missing features of linker script for crt0

Opened this issue · 3 comments

With capabilities that linker script and its set eval is offering at this moment it is not possible to write fully functional crt0 routine as there is no way to get informations about how big BSS section is. There should be commands in eval environment that will return size of section or memory. Also start address of section or memory.

Another missing feature of linker script is ability to put data into two memories. Because, data section have to be stored in memory where code is located, thus it will be distributed with binary, and have to be linker against RAM as data section is used for initialized variables and its content is often copied from read only memory into read write memory.

TODO list

  • Add mem_size() and mem_begin()
  • Add section_size() and section_begin()
  • Add relevant information about functions above into doc
  • Find and implement best way to deal with data in two memories problem

Small improvement done in d18a5b7. Now it is possible to use mem_begin() and mem_size() functions in linker script.

Added section_size() and section_begin() in 0b26d0f.

Updated documentation in 1c404d9.