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/sh/gensh2/startup/linkcmds.ram | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram') diff --git a/c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram b/c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram index 1d75185354..48c5f4fa46 100644 --- a/c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram +++ b/c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram @@ -138,9 +138,23 @@ SECTIONS } > ram _etext = .; PROVIDE (etext = .); - .fini . : { *(.fini) } =0 - .rodata . : { *(.rodata) *(.gnu.linkonce.r*) } - .rodata1 . : { *(.rodata1) } + .fini . : { *(.fini) } > ram =0 + .rodata . : { *(.rodata) *(.gnu.linkonce.r*) } > ram + .rodata1 . : { *(.rodata1) } > ram + .tdata : { + __TLS_Data_begin = .; + *(.tdata .tdata.* .gnu.linkonce.td.*) + __TLS_Data_end = .; + } > ram + .tbss : { + __TLS_BSS_begin = .; + *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) + __TLS_BSS_end = .; + } > ram + __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); /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN(128) + (. & (128 - 1)); -- cgit v1.2.3