19#ifndef ZEPHYR_INCLUDE_LINKER_LINKER_DEFS_H_
20#define ZEPHYR_INCLUDE_LINKER_LINKER_DEFS_H_
26#include <zephyr/offsets.h>
34#define DT_NODE_HAS_STATUS(node, status) 0
35#define DT_NODE_HAS_STATUS_OKAY(node) 0
47#define CREATE_OBJ_LEVEL(object, level) \
48 __##object##_##level##_start = .; \
49 KEEP(*(SORT(.z_##object##_##level?_*))); \
50 KEEP(*(SORT(.z_##object##_##level??_*)));
57#elif defined(_ASMLANGUAGE)
63GDATA(__data_region_load_start)
64GDATA(__data_region_start)
65GDATA(__data_region_num_words)
82extern char _app_smem_start[];
83extern char _app_smem_end[];
84extern char _app_smem_size[];
85extern char _app_smem_rom_start[];
86extern char _app_smem_num_words[];
88#ifdef CONFIG_LINKER_USE_PINNED_SECTION
89extern char _app_smem_pinned_start[];
90extern char _app_smem_pinned_end[];
91extern char _app_smem_pinned_size[];
92extern char _app_smem_pinned_num_words[];
105extern char __kernel_ram_start[];
106extern char __kernel_ram_end[];
107extern char __kernel_ram_size[];
110extern char __bss_start[];
111extern char __bss_end[];
115extern char __data_region_load_start[];
116extern char __data_region_start[];
117extern char __data_region_end[];
122extern char z_mapped_start[];
123extern char z_mapped_end[];
127extern char __rom_region_start[];
128extern char __rom_region_end[];
129extern char __rom_region_size[];
132extern char _flash_used[];
135extern char _image_ram_start[];
136extern char _image_ram_end[];
137extern char _image_ram_size[];
139extern char __text_region_start[];
140extern char __text_region_end[];
141extern char __text_region_size[];
143extern char __rodata_region_start[];
144extern char __rodata_region_end[];
145extern char __rodata_region_size[];
147extern char _vector_start[];
148extern char _vector_end[];
150#ifdef CONFIG_SW_VECTOR_RELAY
151extern char __vector_relay_table[];
154#ifdef CONFIG_COVERAGE_GCOV
155extern char __gcov_bss_start[];
156extern char __gcov_bss_end[];
157extern char __gcov_bss_size[];
163#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)))
164extern char __ccm_data_rom_start[];
165extern char __ccm_start[];
166extern char __ccm_data_start[];
167extern char __ccm_data_end[];
168extern char __ccm_bss_start[];
169extern char __ccm_bss_end[];
170extern char __ccm_noinit_start[];
171extern char __ccm_noinit_end[];
172extern char __ccm_end[];
175#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm)))
176extern char __itcm_start[];
177extern char __itcm_end[];
178extern char __itcm_size[];
179extern char __itcm_load_start[];
182#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)))
183extern char __dtcm_data_start[];
184extern char __dtcm_data_end[];
185extern char __dtcm_bss_start[];
186extern char __dtcm_bss_end[];
187extern char __dtcm_noinit_start[];
188extern char __dtcm_noinit_end[];
189extern char __dtcm_data_load_start[];
190extern char __dtcm_start[];
191extern char __dtcm_end[];
194#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ocm)))
195extern char __ocm_data_start[];
196extern char __ocm_data_end[];
197extern char __ocm_bss_start[];
198extern char __ocm_bss_end[];
199extern char __ocm_start[];
200extern char __ocm_end[];
201extern char __ocm_size[];
207#ifdef CONFIG_ARM_FIRMWARE_HAS_SECURE_ENTRY_FUNCS
208extern char __sg_start[];
209extern char __sg_end[];
210extern char __sg_size[];
221#ifdef CONFIG_NOCACHE_MEMORY
222extern char _nocache_ram_start[];
223extern char _nocache_ram_end[];
224extern char _nocache_ram_size[];
233#ifdef CONFIG_ARCH_HAS_RAMFUNC_SUPPORT
234extern char __ramfunc_region_start[];
235extern char __ramfunc_start[];
236extern char __ramfunc_end[];
237extern char __ramfunc_size[];
238extern char __ramfunc_load_start[];
247#ifdef CONFIG_USERSPACE
248extern char z_priv_stacks_ram_start[];
249extern char z_priv_stacks_ram_end[];
250extern char z_user_stacks_start[];
251extern char z_user_stacks_end[];
252extern char z_kobject_data_begin[];
255#ifdef CONFIG_THREAD_LOCAL_STORAGE
256extern char __tdata_start[];
257extern char __tdata_end[];
258extern char __tdata_size[];
259extern char __tdata_align[];
260extern char __tbss_start[];
261extern char __tbss_end[];
262extern char __tbss_size[];
263extern char __tbss_align[];
264extern char __tls_start[];
265extern char __tls_end[];
266extern char __tls_size[];
269#ifdef CONFIG_LINKER_USE_BOOT_SECTION
273extern char lnkr_boot_start[];
274extern char lnkr_boot_end[];
276extern char lnkr_boot_text_start[];
277extern char lnkr_boot_text_end[];
278extern char lnkr_boot_text_size[];
279extern char lnkr_boot_data_start[];
280extern char lnkr_boot_data_end[];
281extern char lnkr_boot_data_size[];
282extern char lnkr_boot_rodata_start[];
283extern char lnkr_boot_rodata_end[];
284extern char lnkr_boot_rodata_size[];
285extern char lnkr_boot_bss_start[];
286extern char lnkr_boot_bss_end[];
287extern char lnkr_boot_bss_size[];
288extern char lnkr_boot_noinit_start[];
289extern char lnkr_boot_noinit_end[];
290extern char lnkr_boot_noinit_size[];
293#ifdef CONFIG_LINKER_USE_PINNED_SECTION
299extern char lnkr_pinned_start[];
300extern char lnkr_pinned_end[];
302extern char lnkr_pinned_text_start[];
303extern char lnkr_pinned_text_end[];
304extern char lnkr_pinned_text_size[];
305extern char lnkr_pinned_data_start[];
306extern char lnkr_pinned_data_end[];
307extern char lnkr_pinned_data_size[];
308extern char lnkr_pinned_rodata_start[];
309extern char lnkr_pinned_rodata_end[];
310extern char lnkr_pinned_rodata_size[];
311extern char lnkr_pinned_bss_start[];
312extern char lnkr_pinned_bss_end[];
313extern char lnkr_pinned_bss_size[];
314extern char lnkr_pinned_noinit_start[];
315extern char lnkr_pinned_noinit_end[];
316extern char lnkr_pinned_noinit_size[];
319static inline bool lnkr_is_pinned(
uint8_t *addr)
321 if ((addr >= (
uint8_t *)lnkr_pinned_start) &&
322 (addr < (
uint8_t *)lnkr_pinned_end)) {
330static inline bool lnkr_is_region_pinned(
uint8_t *addr,
size_t sz)
332 if ((addr >= (
uint8_t *)lnkr_pinned_start) &&
333 ((addr + sz) < (
uint8_t *)lnkr_pinned_end)) {
342#ifdef CONFIG_LINKER_USE_ONDEMAND_SECTION
348extern char lnkr_ondemand_start[];
349extern char lnkr_ondemand_end[];
350extern char lnkr_ondemand_load_start[];
352extern char lnkr_ondemand_text_start[];
353extern char lnkr_ondemand_text_end[];
354extern char lnkr_ondemand_text_size[];
355extern char lnkr_ondemand_rodata_start[];
356extern char lnkr_ondemand_rodata_end[];
357extern char lnkr_ondemand_rodata_size[];
363#undef DT_NODE_HAS_STATUS
364#undef DT_NODE_HAS_STATUS_OKAY
Definitions of various linker Sections.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88