Hello Vignesh
-------------------------------------------------------------------------------------------
In list10, The ‘m_text‘ is from 0x00000800 to 0x000FEFFF. The ‘my_text‘ is from 0x000FF000 to 0X000FFFFF
m_text (rx) : ORIGIN = 0x00000800, LENGTH = 0x1M - 0x1800
my_text (rx) : ORIGIN = 0x000FF000, LENGTH = 0x1000
-------------------------------------------------------------------------------------------
In list 1, the ‘m_text‘ is from 0x00000800 to 0x000FFFFF.
m_text (rx) : ORIGIN = 0x00000800, LENGTH = 1M - 0x800
-------------------------------------------------------------------------------------------
You are correct that compared with list 1, the size of ‘m_text’ is 0x1000 bytes less. This memory area is relocated for another section ‘.my_text’. That is how to relocate code that the author intent to show us. The list 10 shows how to allocate a function at a fixed address, which is 0x000FF000 in this example.
Best Regards
Fiona Kuang
TIC - Technical Information Center
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Mark Correct button. Thank you!
-----------------------------------------------------------------------------------------------------------------------