Description
Is your enhancement proposal related to a problem? Please describe.
The following achitectures contains a .last_section
section to facilitate flash / rom region usage calculation: riscv, arm, arm64.
zephyr/include/zephyr/arch/riscv/common/linker.ld
Lines 402 to 404 in 1d879b9
zephyr/include/zephyr/arch/arm/aarch32/cortex_m/scripts/linker.ld
Lines 444 to 446 in 1d879b9
The arm architectures also contains a _flash_used
symbol.
Describe the solution you'd like
Introduce the .last_section
as common section on all architectures, together with a common symbol, for examplke _flash_used
, that is then universally available on all architectures if a sample needs to use it.
This will also ensure the different architectures are aligned in their support for linker symbols, thus making it both easier to understand use Zephyr, as well as maintain the linker scripts.
Describe alternatives you've considered
N/A
Additional context
N/A