linker: Add ROM_SECTIONS location

Currently iterable sections as per the documentation are added with
zephyr_linker_sources(SECTIONS ...) after bss/noinit.
This commit allows putting sections after common-rom.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-04-25 09:14:53 +02:00 committed by Anas Nashif
commit 99366dd2be
26 changed files with 116 additions and 2 deletions

View file

@ -235,6 +235,10 @@ SECTIONS
} >RAMABLE_REGION
#include <zephyr/linker/common-rom.ld>
/* Located in generated directory. This file is populated by calling
* zephyr_linker_sources(ROM_SECTIONS ...). Useful for grouping iterable RO structs.
*/
#include <snippets-rom-sections.ld>
#include <zephyr/linker/thread-local-storage.ld>

View file

@ -445,6 +445,10 @@ SECTIONS
} >RAM :sram0_phdr
#include <zephyr/linker/common-rom.ld>
/* Located in generated directory. This file is populated by calling
* zephyr_linker_sources(ROM_SECTIONS ...). Useful for grouping iterable RO structs.
*/
#include <snippets-rom-sections.ld>
.rodata : ALIGN(4)
{