From 960fd8546fb0130058e6a588fbc62d696d01df0e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 28 Jan 2014 11:52:17 +0100 Subject: bsps: Thread-local storage (TLS) for linkcmds --- c/src/lib/libbsp/moxie/moxiesim/startup/linkcmds | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'c/src/lib/libbsp/moxie') diff --git a/c/src/lib/libbsp/moxie/moxiesim/startup/linkcmds b/c/src/lib/libbsp/moxie/moxiesim/startup/linkcmds index 11a98ba0e2..00e2871916 100644 --- a/c/src/lib/libbsp/moxie/moxiesim/startup/linkcmds +++ b/c/src/lib/libbsp/moxie/moxiesim/startup/linkcmds @@ -132,6 +132,20 @@ SECTIONS } =0 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } .rodata1 : { *(.rodata1) } + .tdata : { + _TLS_Data_begin = .; + *(.tdata .tdata.* .gnu.linkonce.td.*) + _TLS_Data_end = .; + } + .tbss : { + _TLS_BSS_begin = .; + *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) + _TLS_BSS_end = .; + } + _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin; + _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin; + _TLS_Size = _TLS_BSS_end - _TLS_Data_begin; + _TLS_Alignment = ALIGNOF (.tdata); .eh_frame_hdr : { *(.eh_frame_hdr) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ -- cgit v1.2.3