Zephyr Project API
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sections.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013-2014, Wind River Systems, Inc.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
14
15
#ifndef ZEPHYR_INCLUDE_LINKER_SECTIONS_H_
16
#define ZEPHYR_INCLUDE_LINKER_SECTIONS_H_
17
18
#define _TEXT_SECTION_NAME text
19
#define _RODATA_SECTION_NAME rodata
20
#define _CTOR_SECTION_NAME ctors
21
/* Linker issue with XIP where the name "data" cannot be used */
22
#define _DATA_SECTION_NAME datas
23
#define _BSS_SECTION_NAME bss
24
#define _NOINIT_SECTION_NAME noinit
25
26
#define _APP_SMEM_SECTION_NAME app_smem
27
#define _APP_DATA_SECTION_NAME app_datas
28
#define _APP_BSS_SECTION_NAME app_bss
29
#define _APP_NOINIT_SECTION_NAME app_noinit
30
31
#define _UNDEFINED_SECTION_NAME undefined
32
33
/* Interrupts */
34
#define _IRQ_VECTOR_TABLE_SECTION_NAME .gnu.linkonce.irq_vector_table
35
#define _IRQ_VECTOR_TABLE_SECTION_SYMS .gnu.linkonce.irq_vector_table*
36
37
#define _SW_ISR_TABLE_SECTION_NAME .gnu.linkonce.sw_isr_table
38
#define _SW_ISR_TABLE_SECTION_SYMS .gnu.linkonce.sw_isr_table*
39
40
#ifdef CONFIG_SHARED_INTERRUPTS
41
#define _SHARED_SW_ISR_TABLE_SECTION_NAME .gnu.linkonce.shared_sw_isr_table
42
#define _SHARED_SW_ISR_TABLE_SECTION_SYMS .gnu.linkonce.shared_sw_isr_table*
43
#endif
/* CONFIG_SHARED_INTERRUPTS */
44
45
/* Architecture-specific sections */
46
#if defined(CONFIG_ARM)
47
#define _KINETIS_FLASH_CONFIG_SECTION_NAME kinetis_flash_config
48
#define _TI_CCFG_SECTION_NAME .ti_ccfg
49
50
#define _ITCM_SECTION_NAME .itcm
51
52
#define _DTCM_DATA_SECTION_NAME .dtcm_data
53
#define _DTCM_BSS_SECTION_NAME .dtcm_bss
54
#define _DTCM_NOINIT_SECTION_NAME .dtcm_noinit
55
56
#define _OCM_DATA_SECTION_NAME .ocm_data
57
#define _OCM_BSS_SECTION_NAME .ocm_bss
58
#endif
59
60
#define _IMX_BOOT_CONF_SECTION_NAME .boot_hdr.conf
61
#define _IMX_BOOT_DATA_SECTION_NAME .boot_hdr.data
62
#define _IMX_BOOT_IVT_SECTION_NAME .boot_hdr.ivt
63
#define _IMX_BOOT_DCD_SECTION_NAME .boot_hdr.dcd_data
64
#define _IMX_BOOT_CONTAINER_SECTION_NAME .boot_hdr.container
65
66
#define _STM32_BACKUP_SRAM_SECTION_NAME .stm32_backup_sram
67
68
#ifdef CONFIG_NOCACHE_MEMORY
69
#define _NOCACHE_SECTION_NAME nocache
70
#define _NOCACHE_LOAD_SECTION_NAME nocache_load
71
#endif
72
73
/* Symbol table section */
74
#if defined(CONFIG_SYMTAB)
75
#define _SYMTAB_INFO_SECTION_NAME .gnu.linkonce.symtab.info
76
#define _SYMTAB_ENTRY_SECTION_NAME .gnu.linkonce.symtab.entry
77
#define _SYMTAB_SECTION_SYMS .gnu.linkonce.symtab*
78
#endif
/* CONFIG_SYMTAB */
79
80
#if defined(CONFIG_LINKER_USE_BOOT_SECTION)
81
#define BOOT_TEXT_SECTION_NAME boot_text
82
#define BOOT_BSS_SECTION_NAME boot_bss
83
#define BOOT_RODATA_SECTION_NAME boot_rodata
84
#define BOOT_DATA_SECTION_NAME boot_data
85
#define BOOT_NOINIT_SECTION_NAME boot_noinit
86
#endif
87
88
#if defined(CONFIG_LINKER_USE_ONDEMAND_SECTION)
89
#define ONDEMAND_TEXT_SECTION_NAME ondemand_text
90
#define ONDEMAND_RODATA_SECTION_NAME ondemand_rodata
91
#endif
92
93
/* Short section references for use in ASM files */
94
#if defined(_ASMLANGUAGE)
95
/* Various text section names */
96
#define TEXT text
97
98
/* Various data type section names */
99
#define BSS bss
100
#define RODATA rodata
101
#define DATA data
102
#define NOINIT noinit
103
104
#if defined(CONFIG_LINKER_USE_BOOT_SECTION)
105
#define BOOT_TEXT BOOT_TEXT_SECTION_NAME
106
#define BOOT_BSS BOOT_BSS_SECTION_NAME
107
#define BOOT_RODATA BOOT_RODATA_SECTION_NAME
108
#define BOOT_DATA BOOT_DATA_SECTION_NAME
109
#define BOOT_NOINIT BOOT_NOINIT_SECTION_NAME
110
#else
111
#define BOOT_TEXT TEXT
112
#define BOOT_BSS BSS
113
#define BOOT_RODATA RODATA
114
#define BOOT_DATA DATA
115
#define BOOT_NOINIT NOINIT
116
#endif
/* CONFIG_LINKER_USE_BOOT_SECTION */
117
118
#if defined(CONFIG_LINKER_USE_ONDEMAND_SECTION)
119
#define ONDEMAND_TEXT ONDEMAND_TEXT_SECTION_NAME
120
#define ONDEMAND_RODATA ONDEMAND_RODATA_SECTION_NAME
121
#else
122
#define ONDEMAND_TEXT TEXT
123
#define ONDEMAND_RODATA RODATA
124
#endif
/* CONFIG_LINKER_USE_ONDEMAND_SECTION */
125
126
#endif
/* _ASMLANGUAGE */
127
128
#include <
zephyr/linker/section_tags.h
>
129
130
#endif
/* ZEPHYR_INCLUDE_LINKER_SECTIONS_H_ */
section_tags.h
include
zephyr
linker
sections.h
Generated on
for Zephyr Project API by
1.16.1