zephyr/arch/common/CMakeLists.txt
Stephanos Ioannidis 3322489d22 config: Rename TEXT_SECTION_OFFSET to ROM_START_OFFSET
The `TEXT_SECTION_OFFSET` symbol is used to specify the offset between
the beginning of the ROM area and the address of the first ROM section.

This commit renames `TEXT_SECTION_OFFSET` to `ROM_START_OFFSET` because
the first ROM section is not always the `.text` section.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-07-09 14:02:38 -04:00

42 lines
987 B
CMake

# SPDX-License-Identifier: Apache-2.0
if(CONFIG_GEN_ISR_TABLES OR CONFIG_EXECUTION_BENCHMARKING)
zephyr_library()
zephyr_library_sources_ifdef(
CONFIG_GEN_ISR_TABLES
isr_tables.c
sw_isr_common.c
)
zephyr_library_sources_ifdef(
CONFIG_EXECUTION_BENCHMARKING
timing_info_bench.c
)
endif()
# Put functions and data in their own binary sections so that ld can
# garbage collect them
zephyr_cc_option(-ffunction-sections -fdata-sections)
zephyr_linker_sources_ifdef(CONFIG_GEN_ISR_TABLES
SECTIONS
${ZEPHYR_BASE}/include/linker/intlist.ld
)
zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
RAM_SECTIONS
ramfunc.ld
)
zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
RAM_SECTIONS
nocache.ld
)
# Only ARM, X86 and OPENISA_RV32M1_RISCV32 use ROM_START_OFFSET.
if (DEFINED CONFIG_ARM OR DEFINED CONFIG_X86
OR DEFINED CONFIG_SOC_OPENISA_RV32M1_RISCV32)
zephyr_linker_sources(ROM_START SORT_KEY 0x0 rom_start_offset.ld)
endif()