Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
GCC toolchain linker defs. More...
#include <zephyr/kernel/mm.h>
Go to the source code of this file.
Macros | |
#define | GROUP_START(where) |
#define | GROUP_END(where) |
#define | GROUP_LINK_IN(where) > where |
Route memory to a specified memory area. | |
#define | GROUP_ROM_LINK_IN(vregion, lregion) > lregion |
Route memory for a read-only section. | |
#define | GROUP_DATA_LINK_IN(vregion, lregion) > vregion |
Route memory for read-write sections that are loaded. | |
#define | GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion |
Route memory for read-write sections that are NOT loaded; typically this is only used for 'BSS' and 'noinit'. | |
#define | SECTION_PROLOGUE(name, options, align) name options : align |
The SECTION_PROLOGUE() macro is used to define the beginning of a section. | |
#define | SECTION_DATA_PROLOGUE(name, options, align) SECTION_PROLOGUE(name, options, align) |
Same as for SECTION_PROLOGUE(), except that this one must be used for data sections which on XIP platforms will have differing virtual and load addresses (i.e. | |
#define | COMMON_SYMBOLS *(COMMON) |
GCC toolchain linker defs.
This header file defines the necessary macros used by the linker script for use with the GCC linker.
#define COMMON_SYMBOLS *(COMMON) |
#define GROUP_DATA_LINK_IN | ( | vregion, | |
lregion | |||
) | > vregion |
Route memory for read-write sections that are loaded.
Used for initialized data sections that on XIP platforms must be copied at startup.
vregion | Output VMA |
lregion | Output LMA (only used if CONFIG_MMU if VMA != LMA, or CONFIG_XIP) |
#define GROUP_END | ( | where | ) |
#define GROUP_LINK_IN | ( | where | ) | > where |
Route memory to a specified memory area.
The GROUP_LINK_IN() macro is located at the end of the section description and tells the linker that this section is located in the memory area specified by 'where' argument.
This macro is intentionally undefined for CONFIG_MMU systems when CONFIG_KERNEL_VM_BASE is not the same as CONFIG_SRAM_BASE_ADDRESS, as both the LMA and VMA destinations must be known for all sections as this corresponds to physical vs. virtual location.
where | Destination memory area |
#define GROUP_NOLOAD_LINK_IN | ( | vregion, | |
lregion | |||
) | > vregion |
Route memory for read-write sections that are NOT loaded; typically this is only used for 'BSS' and 'noinit'.
vregion | Output VMA |
lregion | Output LMA (only used if CONFIG_MMU if VMA != LMA, corresponds to physical location) |
#define GROUP_ROM_LINK_IN | ( | vregion, | |
lregion | |||
) | > lregion |
Route memory for a read-only section.
The GROUP_ROM_LINK_IN() macro is located at the end of the section description and tells the linker that this a read-only section that is physically placed at the 'lregion` argument.
If CONFIG_XIP is active, the 'lregion' area is flash memory.
If CONFIG_MMU is active, the vregion argument will be used to determine where this is located in the virtual memory map, otherwise it is ignored.
vregion | Output VMA (only used if CONFIG_MMU where LMA != VMA) |
lregion | Output LMA |
#define GROUP_START | ( | where | ) |
#define SECTION_DATA_PROLOGUE | ( | name, | |
options, | |||
align | |||
) | SECTION_PROLOGUE(name, options, align) |
Same as for SECTION_PROLOGUE(), except that this one must be used for data sections which on XIP platforms will have differing virtual and load addresses (i.e.
they'll be copied into RAM at program startup). Such a section must also use GROUP_DATA_LINK_IN to specify the correct output load address.
This is equivalent to SECTION_PROLOGUE() on non-XIP systems. On XIP systems there is an implicit ALIGN_WITH_INPUT specified.
name | Name of the output section |
options | Section options, or left blank |
align | Alignment directives, such as SUBALIGN(). ALIGN() itself is not allowed. May be blank. |
#define SECTION_PROLOGUE | ( | name, | |
options, | |||
align | |||
) | name options : align |
The SECTION_PROLOGUE() macro is used to define the beginning of a section.
On MMU systems where VMA != LMA there is an implicit ALIGN_WITH_INPUT specified.
name | Name of the output section |
options | Section options, such as (NOLOAD), or left blank |
align | Alignment directives, such as SUBALIGN(). ALIGN() itself is not allowed. May be blank. |