1/* SPDX-License-Identifier: Apache-2.0 */ 2 3#ifdef CONFIG_THREAD_LOCAL_STORAGE 4 5 SECTION_DATA_PROLOGUE(tdata,,) 6 { 7 *(.tdata .tdata.* .gnu.linkonce.td.*); 8 } GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 9 10 SECTION_DATA_PROLOGUE(tbss,,) 11 { 12 *(.tbss .tbss.* .gnu.linkonce.tb.* .tcommon); 13 } GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) 14 15 /* 16 * These needs to be outside of the tdata/tbss 17 * sections or else they would be considered 18 * thread-local variables, and the code would use 19 * the wrong values. 20 */ 21#ifdef CONFIG_XIP 22 /* The "master copy" of tdata should be only in flash on XIP systems */ 23 PROVIDE(__tdata_start = LOADADDR(tdata)); 24#else 25 PROVIDE(__tdata_start = ADDR(tdata)); 26#endif 27 PROVIDE(__tdata_size = SIZEOF(tdata)); 28 PROVIDE(__tdata_end = __tdata_start + __tdata_size); 29 PROVIDE(__tdata_align = ALIGNOF(tdata)); 30 31 PROVIDE(__tbss_start = ADDR(tbss)); 32 PROVIDE(__tbss_size = SIZEOF(tbss)); 33 PROVIDE(__tbss_end = __tbss_start + __tbss_size); 34 PROVIDE(__tbss_align = ALIGNOF(tbss)); 35 36 PROVIDE(__tls_start = __tdata_start); 37 PROVIDE(__tls_end = __tbss_end); 38 PROVIDE(__tls_size = __tbss_end - __tdata_start); 39 40#endif /* CONFIG_THREAD_LOCAL_STORAGE */ 41