summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-22 09:45:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-22 09:51:17 +0200
commitd60e760e8096feac0fff494f9bb1a0538115a905 (patch)
treeb8cba4a1a5e2ad9f5004eb5779c9d512884420f2 /c/src/lib/libbsp/powerpc/score603e/startup/linkcmds
parentbsp/mbx8xx: Fix Makefile.am and bsp_specs (diff)
downloadrtems-d60e760e8096feac0fff494f9bb1a0538115a905.tar.bz2
bsps: Fix TLS support in linker command files
The TLS section symbols had wrong values in case of an empty TLS data section and a nonempty TLS BSS section.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/score603e/startup/linkcmds4
1 files changed, 3 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds b/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds
index 69e67e36ec..46b5e381de 100644
--- a/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds
@@ -114,9 +114,11 @@ SECTIONS
_TLS_BSS_end = .;
} >RAM
_TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
+ _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
+ _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
_TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
_TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
- _TLS_Alignment = ALIGNOF (.tdata);
+ _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
.eh_frame : { *(.eh_frame) } >RAM
_etext = .;
PROVIDE (_etext = .);