2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-11-01 19:10:26 +08:00
|
|
|
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()
|
|
|
|
|
2017-10-27 21:43:34 +08:00
|
|
|
# Put functions and data in their own binary sections so that ld can
|
|
|
|
# garbage collect them
|
|
|
|
zephyr_cc_option(-ffunction-sections -fdata-sections)
|
|
|
|
|
2019-03-20 20:10:48 +08:00
|
|
|
zephyr_linker_sources_ifdef(CONFIG_GEN_ISR_TABLES
|
|
|
|
SECTIONS
|
2020-01-29 15:48:33 +08:00
|
|
|
${ZEPHYR_BASE}/include/linker/intlist.ld
|
2019-03-20 20:10:48 +08:00
|
|
|
)
|
2019-03-13 00:15:32 +08:00
|
|
|
|
|
|
|
zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
|
|
|
|
RAM_SECTIONS
|
|
|
|
ramfunc.ld
|
|
|
|
)
|
2019-03-20 20:04:45 +08:00
|
|
|
|
|
|
|
zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
|
|
|
|
RAM_SECTIONS
|
|
|
|
nocache.ld
|
|
|
|
)
|
2019-11-29 20:31:00 +08:00
|
|
|
|
2020-01-17 21:36:19 +08:00
|
|
|
# Only ARM, X86 and OPENISA_RV32M1_RISCV32 use TEXT_SECTION_OFFSET.
|
|
|
|
if (DEFINED CONFIG_ARM OR DEFINED CONFIG_X86
|
|
|
|
OR DEFINED CONFIG_SOC_OPENISA_RV32M1_RISCV32)
|
|
|
|
zephyr_linker_sources(ROM_START SORT_KEY 0x0 text_section_offset.ld)
|
2019-11-29 20:31:00 +08:00
|
|
|
endif()
|