linker: ifdef thread local storage script
XCC Clang doesn't emit load address when a section is empty, resulting in __tdata_start not being defined. So put a #ifdef guard for the thread local storage linker script to avoid this issue. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
5ef8db8ac9
commit
0ee896117c
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
/* SPDX-License-Identifier: Apache-2.0 */
|
||||
|
||||
#ifdef CONFIG_THREAD_LOCAL_STORAGE
|
||||
|
||||
SECTION_DATA_PROLOGUE(tdata,,)
|
||||
{
|
||||
*(.tdata .tdata.* .gnu.linkonce.td.*);
|
||||
|
@ -27,3 +29,5 @@
|
|||
PROVIDE(__tls_start = __tdata_start);
|
||||
PROVIDE(__tls_end = __tbss_end);
|
||||
PROVIDE(__tls_size = __tbss_end - __tdata_start);
|
||||
|
||||
#endif /* CONFIG_THREAD_LOCAL_STORAGE */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue