linker: add an initialized DATA_SECTIONS linker location option
Current location options for linker source files includes init and noinit ram data, but only a noinit ram section. This makes it impossible for application code to define an initialized RAM output section, such as with the Z_ITERABLE_SECTION_RAM() helpers. Adding a DATA_SECTIONS linker source option for this use case. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
114b84a58b
commit
ef93bbad57
12 changed files with 81 additions and 19 deletions
|
@ -196,6 +196,11 @@ SECTIONS {
|
|||
#include <linker/cplusplus-ram.ld>
|
||||
#endif /* __MWDT_LINKER_CMD__ */
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
MPU_MIN_SIZE_ALIGN
|
||||
/* Define linker symbols */
|
||||
|
|
|
@ -298,6 +298,11 @@ SECTIONS
|
|||
#include <linker/kobject-data.ld>
|
||||
#include <linker/cplusplus-ram.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
|
||||
|
||||
|
|
|
@ -323,6 +323,11 @@ SECTIONS
|
|||
|
||||
#include <linker/cplusplus-ram.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
|
||||
#ifndef CONFIG_USERSPACE
|
||||
|
|
|
@ -274,6 +274,11 @@ SECTIONS
|
|||
#include <linker/kobject-data.ld>
|
||||
#include <linker/cplusplus-ram.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
|
||||
|
||||
|
|
|
@ -228,6 +228,11 @@ SECTIONS
|
|||
|
||||
#include <linker/cplusplus-ram.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
|
||||
SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),)
|
||||
|
|
|
@ -48,6 +48,11 @@ SECTIONS
|
|||
|
||||
#include <arch/posix/native_tasks.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
|
|
|
@ -247,6 +247,12 @@ SECTIONS
|
|||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-ram-sections.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
|
||||
MPU_MIN_SIZE_ALIGN
|
||||
|
|
|
@ -104,6 +104,12 @@ SECTIONS
|
|||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-ram-sections.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
__data_ram_end = .;
|
||||
|
||||
SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),)
|
||||
|
|
|
@ -476,6 +476,11 @@ SECTIONS
|
|||
#include <linker/kobject-data.ld>
|
||||
#endif /* !CONFIG_LINKER_USE_PINNED_SECTION */
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
MMU_PAGE_ALIGN
|
||||
__data_ram_end = .;
|
||||
|
||||
|
|
|
@ -184,6 +184,11 @@ SECTIONS
|
|||
#include <linker/cplusplus-ram.ld>
|
||||
#include <arch/x86/pagetables.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
*/
|
||||
#include <snippets-data-sections.ld>
|
||||
|
||||
/* Must be last in RAM */
|
||||
#include <linker/kobject-data.ld>
|
||||
MMU_PAGE_ALIGN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue