linker: devicetree_regions: Infer VMA when defining section

Explicitly setting the start of VMA can intefere if the memory
region was used in another section, for example indirectly via
zephyr_code_relocate().

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
Andriy Gelman 2023-06-17 10:56:41 -04:00 committed by Carles Cufí
parent a451a030e4
commit 68ee177a01

View file

@ -136,7 +136,7 @@
* will result in:
*
* @code{.unparsed}
* FOOBAR 0x20010000 (NOLOAD) :
* FOOBAR (NOLOAD) :
* {
* __FOOBAR_start = .;
* KEEP(*(FOOBAR))
@ -150,7 +150,7 @@
* @param node_id devicetree node identifier
*/
#define _SECTION_DECLARE(node_id) \
LINKER_DT_NODE_REGION_NAME_TOKEN(node_id) DT_REG_ADDR(node_id) (NOLOAD) : \
LINKER_DT_NODE_REGION_NAME_TOKEN(node_id) (NOLOAD) : \
{ \
_DT_SECTION_START(node_id) = .; \
KEEP(*(LINKER_DT_NODE_REGION_NAME_TOKEN(node_id))) \