Commit abf90d4a authored by Hou Zhiqiang's avatar Hou Zhiqiang Committed by David Leach
Browse files

arm64: linker: create region and section from zephyr,memory-region



In arm64 linker script, create a memory region and section for each
device tree node with compatible string "zephyr,memory-region".

Signed-off-by: default avatarHou Zhiqiang <Zhiqiang.Hou@nxp.com>
parent be307f8a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <zephyr/linker/sections.h>
#include <zephyr/devicetree.h>

#include <zephyr/linker/devicetree_regions.h>
#include <zephyr/linker/linker-defs.h>
#include <zephyr/linker/linker-tool.h>

@@ -66,6 +67,7 @@ MEMORY
{
    FLASH     (rx) : ORIGIN = ROM_ADDR, LENGTH = ROM_SIZE
    RAM       (wx) : ORIGIN = RAM_ADDR, LENGTH = RAM_SIZE
    LINKER_DT_REGIONS()
    /* Used by and documented in include/linker/intlist.ld */
    IDT_LIST  (wx) : ORIGIN = 0xFFFF8000, LENGTH = 32K
}
@@ -333,6 +335,8 @@ SECTIONS

    /DISCARD/ : { *(.note.GNU-stack) }

    /* Sections generated from 'zephyr,memory-region' nodes */
    LINKER_DT_SECTIONS()

    /* Must be last in romable region */
    SECTION_PROLOGUE(.last_section,,)
+0 −11
Original line number Diff line number Diff line
@@ -5,19 +5,8 @@

#include <zephyr/linker/sections.h>
#include <zephyr/devicetree.h>
#include <zephyr/linker/devicetree_regions.h>

#include <zephyr/linker/linker-defs.h>
#include <zephyr/linker/linker-tool.h>

MEMORY
{
	LINKER_DT_REGIONS()
}

SECTIONS
{
	LINKER_DT_SECTIONS()
}

#include <zephyr/arch/arm64/scripts/linker.ld>
+0 −11
Original line number Diff line number Diff line
@@ -6,19 +6,8 @@

#include <zephyr/linker/sections.h>
#include <zephyr/devicetree.h>
#include <zephyr/linker/devicetree_regions.h>

#include <zephyr/linker/linker-defs.h>
#include <zephyr/linker/linker-tool.h>

MEMORY
{
	LINKER_DT_REGIONS()
}

SECTIONS
{
	LINKER_DT_SECTIONS()
}

#include <zephyr/arch/arm64/scripts/linker.ld>