summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mbx8xx
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/mbx8xx
parente2782684f21ff67a385757ba2ff5de26f54fb1e9 (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 'c/src/lib/libbsp/powerpc/mbx8xx')
-rw-r--r--c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds4
1 files changed, 3 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds b/c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds
index 9307a9e8cc..45332bceaa 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds
@@ -152,9 +152,11 @@ SECTIONS
} >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));
.rel.dyn :
{