riscv: linker: correct _image_rom_size symbol info
This makes the _image_rom_size provide correct actual ROM image size. Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
This commit is contained in:
parent
3262eb416f
commit
7c2dfc1558
1 changed files with 10 additions and 2 deletions
|
@ -188,8 +188,6 @@ SECTIONS
|
|||
#include <linker/cplusplus-rom.ld>
|
||||
_image_rodata_end = .;
|
||||
MPU_ALIGN(_image_rodata_end - _image_rom_start);
|
||||
_image_rom_end = .;
|
||||
_image_rom_size = _image_rom_end - _image_rom_start;
|
||||
GROUP_END(ROMABLE_REGION)
|
||||
|
||||
GROUP_START(RAMABLE_REGION)
|
||||
|
@ -343,4 +341,14 @@ GROUP_END(DTCM)
|
|||
KEEP(*(.gnu.attributes))
|
||||
}
|
||||
|
||||
/* Must be last in romable region */
|
||||
SECTION_PROLOGUE(.last_section,(NOLOAD),)
|
||||
{
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
/* To provide the image size as a const expression,
|
||||
* calculate this value here. */
|
||||
_image_rom_end = LOADADDR(.last_section);
|
||||
_image_rom_size = _image_rom_end - _image_rom_start;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue