Skip to content

Commit 3804029

Browse files
tejlmandnashif
authored andcommitted
cmake: linker: converter arm and common ld scripts into CMake code
Converted existing ld script templates into CMake files. This commit takes the common-ram.ld, common-rom.ld, debug-sections.ld, and thread-local-storage.ld and creates corresponding CMake files for the linker script generator. The CMake files uses the new Zephyr CMake functions: - zephyr_linker_section() - zephyr_linker_section_configure() - zephyr_linker_section_obj_level() to generate the same linker result as the existing C preprocessor based scheme. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent 90e7078 commit 3804029

File tree

5 files changed

+377
-0
lines changed

5 files changed

+377
-0
lines changed

arch/common/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
3838
if (DEFINED CONFIG_ARM OR DEFINED CONFIG_X86 OR DEFINED CONFIG_ARM64
3939
OR DEFINED CONFIG_SOC_OPENISA_RV32M1_RISCV32)
4040
zephyr_linker_sources(ROM_START SORT_KEY 0x0 rom_start_offset.ld)
41+
# Handled in ld.cmake
4142
endif()
4243

4344

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# originates from common-ram.ld
2+
3+
if(CONFIG_GEN_SW_ISR_TABLE AND CONFIG_DYNAMIC_INTERRUPTS)
4+
# ld align has been changed to subalign to provide identical behavior scatter vs. ld.
5+
zephyr_linker_section(NAME sw_isr_table
6+
GROUP DATA_REGION
7+
${XIP_ALIGN_WITH_INPUT} SUBALIGN ${CONFIG_ARCH_SW_ISR_TABLE_ALIGN}
8+
)
9+
zephyr_linker_section_configure(
10+
SECTION sw_isr_table
11+
INPUT ".gnu.linkonce.sw_isr_table*"
12+
)
13+
endif()
14+
15+
zephyr_linker_section(NAME device_states GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
16+
zephyr_linker_section_configure(SECTION device_states
17+
KEEP INPUT ".z_devstate" ".z_devstate.*"
18+
)
19+
20+
if(CONFIG_PM_DEVICE)
21+
zephyr_linker_section(NAME pm_device_slots GROUP DATA_REGION TYPE NOLOAD NOINPUT ${XIP_ALIGN_WITH_INPUT})
22+
zephyr_linker_section_configure(SECTION pm_device_slots KEEP INPUT ".z_pm_device_slots")
23+
endif()
24+
25+
zephyr_linker_section(NAME initshell GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
26+
zephyr_linker_section_configure(SECTION initshell
27+
KEEP INPUT ".shell_module_*"
28+
SYMBOLS __shell_module_start __shell_module_end
29+
)
30+
zephyr_linker_section_configure(SECTION initshell
31+
KEEP INPUT ".shell_cmd_*"
32+
SYMBOLS __shell_cmd_start __shell_end_end
33+
)
34+
35+
zephyr_linker_section(NAME log_dynamic GROUP DATA_REGION NOINPUT)
36+
zephyr_linker_section_configure(SECTION log_dynamic KEEP INPUT ".log_dynamic_*")
37+
38+
zephyr_iterable_section(NAME _static_thread_data GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
39+
40+
if(CONFIG_USERSPACE)
41+
# All kernel objects within are assumed to be either completely
42+
# initialized at build time, or initialized automatically at runtime
43+
# via iteration before the POST_KERNEL phase.
44+
#
45+
# These two symbols only used by gen_kobject_list.py
46+
# _static_kernel_objects_begin = .;
47+
endif()
48+
49+
zephyr_iterable_section(NAME k_timer GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
50+
zephyr_iterable_section(NAME k_mem_slab GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
51+
zephyr_iterable_section(NAME k_mem_pool GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
52+
zephyr_iterable_section(NAME k_heap GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
53+
zephyr_iterable_section(NAME k_mutex GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
54+
zephyr_iterable_section(NAME k_stack GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
55+
zephyr_iterable_section(NAME k_msgq GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
56+
zephyr_iterable_section(NAME k_mbox GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
57+
zephyr_iterable_section(NAME k_pipe GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
58+
zephyr_iterable_section(NAME k_sem GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
59+
zephyr_iterable_section(NAME k_queue GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
60+
zephyr_iterable_section(NAME k_condvar GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
61+
62+
zephyr_linker_section(NAME _net_buf_pool_area GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
63+
zephyr_linker_section_configure(SECTION _net_buf_pool_area
64+
KEEP SORT NAME INPUT "._net_buf_pool.static.*"
65+
SYMBOLS _net_buf_pool_list
66+
)
67+
68+
if(CONFIG_NETWORKING)
69+
zephyr_iterable_section(NAME net_if GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
70+
zephyr_iterable_section(NAME net_if_dev GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
71+
zephyr_iterable_section(NAME net_l2 GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
72+
zephyr_iterable_section(NAME eth_bridge GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
73+
endif()
74+
75+
if(CONFIG_UART_MUX)
76+
zephyr_linker_section(NAME uart_mux GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
77+
zephyr_linker_section_configure(SECTION uart_mux
78+
KEEP SORT NAME INPUT ".uart_mux.*"
79+
)
80+
endif()
81+
82+
if(CONFIG_USB_DEVICE_STACK)
83+
zephyr_linker_section(NAME usb_descriptor GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 1)
84+
zephyr_linker_section_configure(SECTION usb_descriptor
85+
KEEP SORT NAME INPUT ".usb.descriptor*"
86+
)
87+
88+
zephyr_linker_section(NAME usb_data GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 1)
89+
zephyr_linker_section_configure(SECTION usb_data
90+
KEEP SORT NAME INPUT ".usb.data*"
91+
)
92+
endif()
93+
94+
if(CONFIG_USB_DEVICE_BOS)
95+
zephyr_linker_section(NAME usb_bos_desc GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 1)
96+
zephyr_linker_section_configure(SECTION usb_data
97+
KEEP SORT NAME INPUT ".usb.bos_desc"
98+
)
99+
endif()
100+
101+
#if(CONFIG_USERSPACE)
102+
# _static_kernel_objects_end = .;
103+
#endif()
104+
#
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# originates from common-rom.ld
2+
3+
zephyr_linker_section(NAME init KVMA RAM_REGION GROUP RODATA_REGION)
4+
zephyr_linker_section_obj_level(SECTION init LEVEL PRE_KERNEL_1)
5+
zephyr_linker_section_obj_level(SECTION init LEVEL PRE_KERNEL_2)
6+
zephyr_linker_section_obj_level(SECTION init LEVEL POST_KERNEL)
7+
zephyr_linker_section_obj_level(SECTION init LEVEL APPLICATION)
8+
zephyr_linker_section_obj_level(SECTION init LEVEL SMP)
9+
10+
zephyr_linker_section(NAME device KVMA RAM_REGION GROUP RODATA_REGION)
11+
zephyr_linker_section_obj_level(SECTION device LEVEL PRE_KERNEL_1)
12+
zephyr_linker_section_obj_level(SECTION device LEVEL PRE_KERNEL_2)
13+
zephyr_linker_section_obj_level(SECTION device LEVEL POST_KERNEL)
14+
zephyr_linker_section_obj_level(SECTION device LEVEL APPLICATION)
15+
zephyr_linker_section_obj_level(SECTION device LEVEL SMP)
16+
17+
if(CONFIG_GEN_SW_ISR_TABLE AND NOT CONFIG_DYNAMIC_INTERRUPTS)
18+
# ld align has been changed to subalign to provide identical behavior scatter vs. ld.
19+
zephyr_linker_section(NAME sw_isr_table KVMA FLASH GROUP RODATA_REGION SUBALIGN ${CONFIG_ARCH_SW_ISR_TABLE_ALIGN} NOINPUT)
20+
zephyr_linker_section_configure(
21+
SECTION sw_isr_table
22+
INPUT ".gnu.linkonce.sw_isr_table*"
23+
)
24+
endif()
25+
26+
zephyr_linker_section(NAME initlevel_error KVMA RAM_REGION GROUP RODATA_REGION NOINPUT)
27+
zephyr_linker_section_configure(SECTION initlevel_error INPUT ".z_init_[_A-Z0-9]*" KEEP SORT NAME)
28+
# How to do cross linker ?
29+
# ASSERT(SIZEOF(initlevel_error) == 0, "Undefined initialization levels used.")
30+
31+
32+
if(CONFIG_CPLUSPLUS)
33+
zephyr_linker_section(NAME ctors KVMA RAM_REGION GROUP RODATA_REGION NOINPUT)
34+
#
35+
# The compiler fills the constructor pointers table below,
36+
# hence symbol __CTOR_LIST__ must be aligned on word
37+
# boundary. To align with the C++ standard, the first elment
38+
# of the array contains the number of actual constructors. The
39+
# last element is NULL.
40+
#
41+
# ToDo: Checkup on scatter loading. How to manage ?
42+
# https://www.keil.com/support/man/docs/armlink/armlink_pge1362066006368.htm
43+
# https://developer.arm.com/documentation/dui0378/g/The-ARM-C-and-C---Libraries
44+
# if(CONFIG_64BIT)
45+
# . = ALIGN(8);
46+
# __CTOR_LIST__ = .;
47+
# QUAD((__CTOR_END__ - __CTOR_LIST__) / 8 - 2)
48+
# KEEP(*(SORT_BY_NAME(".ctors*")))
49+
# QUAD(0)
50+
# __CTOR_END__ = .;
51+
# else()
52+
# . = ALIGN(4);
53+
# __CTOR_LIST__ = .;
54+
# LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
55+
# KEEP(*(SORT_BY_NAME(".ctors*")))
56+
# LONG(0)
57+
# __CTOR_END__ = .;
58+
# endif()
59+
# } GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
60+
#
61+
# SECTION_PROLOGUE(init_array,,)
62+
# {
63+
# . = ALIGN(4);
64+
# __init_array_start = .;
65+
# KEEP(*(SORT_BY_NAME(".init_array*")))
66+
# __init_array_end = .;
67+
# } GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
68+
endif()
69+
70+
if(CONFIG_USERSPACE)
71+
# Build-time assignment of permissions to kernel objects to
72+
# threads declared with K_THREAD_DEFINE()
73+
zephyr_linker_section(
74+
NAME z_object_assignment_area
75+
VMA FLASH NOINPUT
76+
SUBALIGN 4
77+
)
78+
zephyr_linker_section_configure(
79+
SECTION z_object_assignment
80+
INPUT ".z_object_assignment.static.*"
81+
KEEP SORT NAME
82+
)
83+
endif()
84+
85+
zephyr_linker_section(
86+
NAME app_shmem_regions
87+
KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT}
88+
)
89+
zephyr_linker_section_configure(
90+
SECTION app_shmem_regions
91+
INPUT ".app_regions.*"
92+
KEEP SORT NAME
93+
)
94+
95+
if(CONFIG_NET_SOCKETS)
96+
zephyr_iterable_section(NAME net_socket_register KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
97+
endif()
98+
99+
100+
if(CONFIG_NET_L2_PPP)
101+
zephyr_iterable_section(NAME ppp_protocol_handler KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
102+
endif()
103+
104+
zephyr_iterable_section(NAME bt_l2cap_fixed_chan KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
105+
106+
if(CONFIG_BT_BREDR)
107+
zephyr_iterable_section(NAME bt_l2cap_br_fixed_chan KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
108+
endif()
109+
110+
if(CONFIG_BT_CONN)
111+
zephyr_iterable_section(NAME bt_conn_cb KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
112+
endif()
113+
114+
zephyr_iterable_section(NAME bt_gatt_service_static KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
115+
116+
if(CONFIG_BT_MESH)
117+
zephyr_iterable_section(NAME bt_mesh_subnet_cb KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
118+
zephyr_iterable_section(NAME bt_mesh_app_key_cb KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
119+
120+
zephyr_iterable_section(NAME bt_mesh_hb_cb KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
121+
endif()
122+
123+
if(CONFIG_BT_MESH_FRIEND)
124+
zephyr_iterable_section(NAME bt_mesh_friend_cb KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
125+
endif()
126+
127+
if(CONFIG_BT_MESH_LOW_POWER)
128+
zephyr_iterable_section(NAME bt_mesh_lpn_cb KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
129+
endif()
130+
131+
if(CONFIG_BT_MESH_PROXY)
132+
zephyr_iterable_section(NAME bt_mesh_proxy_cb KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
133+
endif()
134+
135+
if(CONFIG_EC_HOST_CMD)
136+
zephyr_iterable_section(NAME ec_host_cmd_handler KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
137+
endif()
138+
139+
if(CONFIG_SETTINGS)
140+
zephyr_iterable_section(NAME settings_handler_static KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
141+
endif()
142+
143+
zephyr_iterable_section(NAME k_p4wq_initparam KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
144+
145+
if(CONFIG_EMUL)
146+
zephyr_linker_section(NAME emulators_section GROUP RODATA_REGION)
147+
zephyr_linker_section_configure(SECTION emulators_section INPUT ".emulators" KEEP SORT NAME ${XIP_ALIGN_WITH_INPUT})
148+
endif()
149+
150+
if(CONFIG_DNS_SD)
151+
zephyr_iterable_section(NAME dns_sd_rec KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
152+
endif()
153+
154+
if(CONFIG_PCIE)
155+
zephyr_linker_section(NAME irq_alloc GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
156+
zephyr_linker_section_configure(SECTION irq_alloc INPUT ".irq_alloc*" KEEP SORT NAME)
157+
endif()
158+
159+
zephyr_linker_section(NAME log_strings KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
160+
zephyr_linker_section_configure(SECTION log_strings INPUT ".log_strings*" KEEP SORT NAME)
161+
162+
zephyr_linker_section(NAME log_const KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
163+
zephyr_linker_section_configure(SECTION log_const INPUT ".log_const_*" KEEP SORT NAME)
164+
165+
zephyr_linker_section(NAME log_backends KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
166+
zephyr_linker_section_configure(SECTION log_backends INPUT ".log_backends.*" KEEP)
167+
168+
zephyr_iterable_section(NAME shell KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
169+
170+
zephyr_linker_section(NAME shell_root_cmds KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
171+
zephyr_linker_section_configure(SECTION shell_root_cmds INPUT ".shell_root_cmd_*" KEEP SORT NAME)
172+
173+
zephyr_linker_section(NAME font_entry KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
174+
zephyr_linker_section_configure(SECTION font_entry INPUT "._cfb_font.*" KEEP SORT NAME)
175+
176+
zephyr_iterable_section(NAME tracing_backend KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
177+
178+
zephyr_linker_section(NAME zephyr_dbg_info KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
179+
zephyr_linker_section_configure(SECTION zephyr_dbg_info INPUT ".zephyr_dbg_info" KEEP)
180+
181+
zephyr_linker_section(NAME device_handles KVMA RAM_REGION GROUP RODATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} ENDALIGN 16)
182+
zephyr_linker_section_configure(SECTION device_handles INPUT .__device_handles_pass1* KEEP SORT NAME PASS 1)
183+
zephyr_linker_section_configure(SECTION device_handles INPUT .__device_handles_pass2* KEEP SORT NAME PASS 2)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Content of this file originates from include/linker/debug-sections.ld
2+
# Following sections are obtained via 'ld --verbose'
3+
4+
# Stabs debugging sections.
5+
zephyr_linker_section(NAME .stab ADDRESS 0)
6+
zephyr_linker_section(NAME .stabstr ADDRESS 0)
7+
zephyr_linker_section(NAME .stab.excl ADDRESS 0)
8+
zephyr_linker_section(NAME .stab.exclstr ADDRESS 0)
9+
zephyr_linker_section(NAME .stab.index ADDRESS 0)
10+
zephyr_linker_section(NAME .stab.indexstr ADDRESS 0)
11+
zephyr_linker_section(NAME .gnu.build.attributes ADDRESS 0)
12+
zephyr_linker_section(NAME .comment ADDRESS 0)
13+
14+
# DWARF debug sections.
15+
# Symbols in the DWARF debugging sections are relative to the beginning
16+
# of the section so we begin them at 0.
17+
# DWARF 1 */
18+
zephyr_linker_section(NAME .debug ADDRESS 0)
19+
zephyr_linker_section(NAME .line ADDRESS 0)
20+
21+
# GNU DWARF 1 extensions
22+
zephyr_linker_section(NAME .debug_srcinfo ADDRESS 0)
23+
zephyr_linker_section(NAME .debug_sfnames ADDRESS 0)
24+
25+
# DWARF 1.1 and DWARF 2
26+
zephyr_linker_section(NAME .debug_aranges ADDRESS 0)
27+
zephyr_linker_section(NAME .debug_pubnames ADDRESS 0)
28+
29+
# DWARF 2
30+
zephyr_linker_section(NAME .debug_info ADDRESS 0)
31+
zephyr_linker_section_configure(SECTION .debug_info INPUT ".gnu.linkonce.wi.*")
32+
zephyr_linker_section(NAME .debug_abbrev ADDRESS 0)
33+
zephyr_linker_section(NAME .debug_line ADDRESS 0)
34+
zephyr_linker_section_configure(SECTION .debug_line INPUT ".debug_line_end")
35+
zephyr_linker_section(NAME .debug_frame ADDRESS 0)
36+
zephyr_linker_section(NAME .debug_str ADDRESS 0)
37+
zephyr_linker_section(NAME .debug_loc ADDRESS 0)
38+
zephyr_linker_section(NAME .debug_macinfo ADDRESS 0)
39+
40+
#SGI/MIPS DWARF 2 extensions
41+
zephyr_linker_section(NAME .debug_weaknames ADDRESS 0)
42+
zephyr_linker_section(NAME .debug_funcnames ADDRESS 0)
43+
zephyr_linker_section(NAME .debug_typenames ADDRESS 0)
44+
zephyr_linker_section(NAME .debug_varnames ADDRESS 0)
45+
46+
# DWARF 3
47+
zephyr_linker_section(NAME .debug_pubtypes ADDRESS 0)
48+
zephyr_linker_section(NAME .debug_ranges ADDRESS 0)
49+
# DWARF Extension.
50+
zephyr_linker_section(NAME .debug_macro ADDRESS 0)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# originates from thread-local-storage.ld
2+
3+
if(CONFIG_THREAD_LOCAL_STORAGE)
4+
zephyr_linker_section(NAME .tdata LMA FLASH NOINPUT)
5+
zephyr_linker_section_configure(SECTION .tdata INPUT ".gnu.linkonce.td.*")
6+
# GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
7+
8+
zephyr_linker_section(NAME .tbss LMA FLASH NOINPUT)
9+
zephyr_linker_section_configure(SECTION .tbss INPUT ".gnu.linkonce.tb.*")
10+
zephyr_linker_section_configure(SECTION .tbss INPUT ".tcommon")
11+
# GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
12+
13+
#
14+
# These needs to be outside of the tdata/tbss
15+
# sections or else they would be considered
16+
# thread-local variables, and the code would use
17+
# the wrong values.
18+
#
19+
# This scheme is not yet handled
20+
if(CONFIG_XIP)
21+
# /* The "master copy" of tdata should be only in flash on XIP systems */
22+
# PROVIDE(__tdata_start = LOADADDR(tdata));
23+
else()
24+
# PROVIDE(__tdata_start = ADDR(tdata));
25+
endif()
26+
# PROVIDE(__tdata_size = SIZEOF(tdata));
27+
# PROVIDE(__tdata_end = __tdata_start + __tdata_size);
28+
# PROVIDE(__tdata_align = ALIGNOF(tdata));
29+
#
30+
# PROVIDE(__tbss_start = ADDR(tbss));
31+
# PROVIDE(__tbss_size = SIZEOF(tbss));
32+
# PROVIDE(__tbss_end = __tbss_start + __tbss_size);
33+
# PROVIDE(__tbss_align = ALIGNOF(tbss));
34+
#
35+
# PROVIDE(__tls_start = __tdata_start);
36+
# PROVIDE(__tls_end = __tbss_end);
37+
# PROVIDE(__tls_size = __tbss_end - __tdata_start);
38+
39+
endif()

0 commit comments

Comments
 (0)