linker: align _image_text_start/end/size linker symbols name
Cleanup and preparation commit for linker script generator. Zephyr linker scripts provides start and end symbols for each larger areas in the linker script. The symbols _image_text_start and _image_text_end sometimes includes linker/kobject-text.ld. This mean there must be both the regular __text_start and __text_end symbols for the pure text section, as well as <group>_start and <group>_end symbols. The symbols describing the text region which covers more than just the text section itself will thus be changed to: _image_text_start -> __text_region_start _image_text_end -> __text_region_end Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
c6aded2dcb
commit
3d82c7c828
16 changed files with 39 additions and 39 deletions
|
@ -75,7 +75,7 @@ SECTIONS {
|
|||
|
||||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,ALIGN(1024)) {
|
||||
__rom_region_start = .;
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
|
@ -95,7 +95,7 @@ SECTIONS {
|
|||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
#endif /* CONFIG_CPLUSPLUS && !CONFIG_CPP_STATIC_INIT_GNU && __MWDT_LINKER_CMD__ */
|
||||
|
||||
_image_text_end = .;
|
||||
__text_region_end = .;
|
||||
__rodata_region_start = .;
|
||||
|
||||
#include <linker/common-rom.ld>
|
||||
|
|
|
@ -127,7 +127,7 @@ SECTIONS
|
|||
|
||||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
|
||||
#include <linker/kobject-text.ld>
|
||||
|
||||
|
@ -143,7 +143,7 @@ SECTIONS
|
|||
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
_image_text_end = .;
|
||||
__text_region_end = .;
|
||||
|
||||
#if defined (CONFIG_CPLUSPLUS)
|
||||
SECTION_PROLOGUE(.ARM.extab,,)
|
||||
|
@ -205,12 +205,12 @@ SECTIONS
|
|||
* RODATA must be the last section so that the size of the entire read
|
||||
* only area will be filled to a power of 2.
|
||||
*/
|
||||
MPU_ALIGN(ABSOLUTE(.) - _image_rom_start);
|
||||
MPU_ALIGN(ABSOLUTE(.) - __rom_region_start);
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
__rodata_region_end = .;
|
||||
_image_rom_end = .;
|
||||
_image_rom_end_order = (LOG2CEIL(_image_rom_end) - 1) << 1;
|
||||
__rom_region_end = .;
|
||||
_image_rom_end_order = (LOG2CEIL(__rom_region_end) - 1) << 1;
|
||||
|
||||
GROUP_END(ROMABLE_REGION)
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ SECTIONS
|
|||
|
||||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
|
||||
#include <linker/kobject-text.ld>
|
||||
|
||||
|
@ -162,7 +162,7 @@ SECTIONS
|
|||
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
_image_text_end = .;
|
||||
__text_region_end = .;
|
||||
|
||||
#if defined (CONFIG_CPLUSPLUS)
|
||||
SECTION_PROLOGUE(.ARM.extab,,)
|
||||
|
|
|
@ -93,7 +93,7 @@ SECTIONS
|
|||
|
||||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
#ifndef CONFIG_XIP
|
||||
z_mapped_start = .;
|
||||
#endif
|
||||
|
@ -126,8 +126,8 @@ SECTIONS
|
|||
MMU_ALIGN;
|
||||
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
_image_text_end = .;
|
||||
_image_text_size = _image_text_end - _image_text_start;
|
||||
__text_region_end = .;
|
||||
__text_region_size = __text_region_end - __text_region_start;
|
||||
|
||||
#if defined (CONFIG_CPLUSPLUS)
|
||||
SECTION_PROLOGUE(.ARM.extab,,)
|
||||
|
|
|
@ -145,7 +145,7 @@ SECTIONS
|
|||
KEEP(*(.openocd_debug))
|
||||
KEEP(*(".openocd_debug.*"))
|
||||
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
|
||||
*(.text)
|
||||
*(".text.*")
|
||||
|
@ -161,7 +161,7 @@ SECTIONS
|
|||
#endif
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
|
||||
_image_text_end = .;
|
||||
__text_region_end = .;
|
||||
|
||||
__rodata_region_start = .;
|
||||
#include <linker/common-rom.ld>
|
||||
|
|
|
@ -30,7 +30,7 @@ SECTIONS
|
|||
{
|
||||
/* Trap table alignment required by SPARC V8 specification. */
|
||||
. = ALIGN(0x1000);
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
|
||||
*(.text.traptable)
|
||||
*(.text)
|
||||
|
@ -39,7 +39,7 @@ SECTIONS
|
|||
*(.gnu.linkonce.t.*)
|
||||
} GROUP_LINK_IN(REGION_TEXT)
|
||||
|
||||
_image_text_end = .;
|
||||
__text_region_end = .;
|
||||
__rodata_region_start = .;
|
||||
|
||||
#include <linker/common-rom.ld>
|
||||
|
|
|
@ -293,7 +293,7 @@ SECTIONS
|
|||
#endif
|
||||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
|
||||
#if !defined(CONFIG_LINKER_USE_BOOT_SECTION) || \
|
||||
!defined(CONFIG_LINKER_USE_PINNED_SECTION)
|
||||
|
@ -327,8 +327,8 @@ SECTIONS
|
|||
MMU_PAGE_ALIGN_PERM
|
||||
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
_image_text_end = .;
|
||||
_image_text_size = _image_text_end - _image_text_start;
|
||||
__text_region_end = .;
|
||||
__text_region_size = __text_region_end - __text_region_start;
|
||||
__rodata_region_start = .;
|
||||
|
||||
#ifndef CONFIG_LINKER_USE_PINNED_SECTION
|
||||
|
|
|
@ -89,7 +89,7 @@ SECTIONS
|
|||
{
|
||||
. = ALIGN(16);
|
||||
__rom_region_start = .;
|
||||
_image_text_start = .;
|
||||
__text_region_start = .;
|
||||
z_mapped_start = .;
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
|
@ -99,8 +99,8 @@ SECTIONS
|
|||
MMU_PAGE_ALIGN_PERM
|
||||
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
_image_text_end = .;
|
||||
_image_text_size = _image_text_end - _image_text_start;
|
||||
__text_region_end = .;
|
||||
__text_region_size = __text_region_end - __text_region_start;
|
||||
__rodata_region_start = .;
|
||||
|
||||
#include <linker/common-rom.ld>
|
||||
|
|
|
@ -247,9 +247,9 @@ extern char _flash_used[];
|
|||
extern char _image_ram_start[];
|
||||
extern char _image_ram_end[];
|
||||
|
||||
extern char _image_text_start[];
|
||||
extern char _image_text_end[];
|
||||
extern char _image_text_size[];
|
||||
extern char __text_region_start[];
|
||||
extern char __text_region_end[];
|
||||
extern char __text_region_size[];
|
||||
|
||||
extern char __rodata_region_start[];
|
||||
extern char __rodata_region_end[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue