Changeset d60e760 in rtems


Ignore:
Timestamp:
Apr 22, 2014, 7:45:39 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
a531683
Parents:
e2782684
git-author:
Sebastian Huber <sebastian.huber@…> (04/22/14 07:45:39)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/22/14 07:51:17)
Message:

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.

Files:
79 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/gba/startup/linkcmds

    re2782684 rd60e760  
    151151  }
    152152  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     153  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     154  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    153155  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    154156  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    155   _TLS_Alignment = ALIGNOF (.tdata);
     157  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    156158  __rodata_end = . ;
    157159
  • c/src/lib/libbsp/arm/shared/startup/linkcmds.base

    re2782684 rd60e760  
    133133        } > REGION_RODATA AT > REGION_RODATA_LOAD
    134134        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     135        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     136        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    135137        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    136138        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    137         _TLS_Alignment = ALIGNOF (.tdata);
     139        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    138140        .preinit_array : ALIGN_WITH_INPUT {
    139141                PROVIDE_HIDDEN (__preinit_array_start = .);
  • c/src/lib/libbsp/avr/avrtest/startup/linkcmds

    re2782684 rd60e760  
    164164  }  > data
    165165  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     166  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     167  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    166168  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    167169  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    168   _TLS_Alignment = ALIGNOF (.tdata);
     170  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    169171  .data   :
    170172  {
  • c/src/lib/libbsp/bfin/TLL6527M/startup/linkcmds

    re2782684 rd60e760  
    8080
    8181    __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     82    __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     83    __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    8284    __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    8385    __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    84     __TLS_Alignment = ALIGNOF (.tdata);
     86    __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    8587   
    8688    .fini :
  • c/src/lib/libbsp/bfin/bf537Stamp/startup/linkcmds

    re2782684 rd60e760  
    8888
    8989    __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     90    __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     91    __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    9092    __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    9193    __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    92     __TLS_Alignment = ALIGNOF (.tdata);
     94    __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    9395   
    9496    .fini :
  • c/src/lib/libbsp/bfin/eZKit533/startup/linkcmds

    re2782684 rd60e760  
    7777
    7878    __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     79    __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     80    __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    7981    __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    8082    __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    81     __TLS_Alignment = ALIGNOF (.tdata);
     83    __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    8284   
    8385    .fini :
  • c/src/lib/libbsp/h8300/h8sim/startup/linkcmds

    re2782684 rd60e760  
    7171    }  >ram
    7272    __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     73    __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     74    __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    7375    __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    7476    __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    75     __TLS_Alignment = ALIGNOF (.tdata);
     77    __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    7678   .tors SIZEOF(.tbss) + ADDR(.tbss): {
    7779        ___ctors = . ;
  • c/src/lib/libbsp/i386/pc386/startup/linkcmds

    re2782684 rd60e760  
    109109  }
    110110  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     111  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     112  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    111113  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    112114  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    113   _TLS_Alignment = ALIGNOF (.tdata);
     115  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    114116  .eh_frame_hdr : { *(.eh_frame_hdr) }
    115117  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  • c/src/lib/libbsp/lm32/lm32_evr/startup/linkcmds

    re2782684 rd60e760  
    9191  } > sdram
    9292  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     93  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     94  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    9395  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    9496  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    95   _TLS_Alignment = ALIGNOF (.tdata);
     97  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    9698
    9799  /* Adjust the address for the data segment.  We want to adjust up to
  • c/src/lib/libbsp/lm32/milkymist/startup/linkcmds

    re2782684 rd60e760  
    9090  } > sdram
    9191  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     92  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     93  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    9294  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    9395  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    94   _TLS_Alignment = ALIGNOF (.tdata);
     96  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    9597
    9698  /* Adjust the address for the data segment.  We want to adjust up to
  • c/src/lib/libbsp/m32c/m32cbsp/startup/linkcmds

    re2782684 rd60e760  
    7373  } > RAM
    7474  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     75  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     76  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    7577  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    7678  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    77   __TLS_Alignment = ALIGNOF (.tdata);
     79  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    7880
    7981  .data : {
  • c/src/lib/libbsp/m32r/m32rsim/startup/linkcmds

    re2782684 rd60e760  
    9292  }
    9393  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     94  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     95  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    9496  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    9597  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    96   _TLS_Alignment = ALIGNOF (.tdata);
     98  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    9799  .sdata2         :
    98100  {
  • c/src/lib/libbsp/m68k/av5282/startup/linkcmds

    re2782684 rd60e760  
    148148
    149149    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     150    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     151    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    150152    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    151153    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    152     _TLS_Alignment = ALIGNOF (.tdata);
     154    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    153155       
    154156        .data : {
  • c/src/lib/libbsp/m68k/av5282/startup/linkcmdsflash

    re2782684 rd60e760  
    147147
    148148    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     149    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     150    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    149151    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    150152    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    151     _TLS_Alignment = ALIGNOF (.tdata);
     153    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    152154       
    153155        .data 0x1000 : AT ( ADDR(.tdata) + SIZEOF ( .tdata ) )
  • c/src/lib/libbsp/m68k/av5282/startup/linkcmdsram

    re2782684 rd60e760  
    147147
    148148    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     149    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     150    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    149151    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    150152    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    151     _TLS_Alignment = ALIGNOF (.tdata);
     153    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    152154       
    153155        .data : {
  • c/src/lib/libbsp/m68k/csb360/startup/linkcmds

    re2782684 rd60e760  
    116116
    117117   _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     118   _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     119   _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    118120   _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    119121   _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    120    _TLS_Alignment = ALIGNOF (.tdata);
     122   _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    121123
    122124
  • c/src/lib/libbsp/m68k/gen68302/startup/linkcmds

    re2782684 rd60e760  
    129129
    130130        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     131        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     132        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    131133        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    132134        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    133         _TLS_Alignment = ALIGNOF (.tdata);
     135        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    134136
    135137        .data : {
  • c/src/lib/libbsp/m68k/gen68340/startup/linkcmds

    re2782684 rd60e760  
    157157
    158158        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     159        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     160        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    159161        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    160162        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    161         _TLS_Alignment = ALIGNOF (.tdata);
     163        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    162164
    163165        .data : {
  • c/src/lib/libbsp/m68k/gen68360/startup/linkcmds

    re2782684 rd60e760  
    121121
    122122        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     123        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     124        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    123125        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    124126        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    125         _TLS_Alignment = ALIGNOF (.tdata);
     127        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    126128
    127129        .data : {
  • c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp

    re2782684 rd60e760  
    126126
    127127        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     128        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     129        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    128130        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    129131        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    130         _TLS_Alignment = ALIGNOF (.tdata);
     132        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    131133
    132134        .data : AT(SIZEOF(.text)) {
  • c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom

    re2782684 rd60e760  
    125125
    126126        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     127        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     128        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    127129        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    128130        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    129         _TLS_Alignment = ALIGNOF (.tdata);
     131        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    130132
    131133        .data : AT(SIZEOF(.text)) {
  • c/src/lib/libbsp/m68k/idp/startup/linkcmds

    re2782684 rd60e760  
    126126
    127127        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     128        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     129        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    128130        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    129131        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    130         _TLS_Alignment = ALIGNOF (.tdata);
     132        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    131133
    132134        .data : {
  • c/src/lib/libbsp/m68k/mcf5206elite/startup/linkcmds

    re2782684 rd60e760  
    151151
    152152  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     153  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     154  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    153155  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    154156  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    155   _TLS_Alignment = ALIGNOF (.tdata);
     157  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    156158
    157159   .data BLOCK (0x4) : {
  • c/src/lib/libbsp/m68k/mcf5206elite/startup/linkcmds.flash

    re2782684 rd60e760  
    151151
    152152  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     153  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     154  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    153155  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    154156  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    155   _TLS_Alignment = ALIGNOF (.tdata);
     157  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    156158
    157159   .data 0x30000400 : AT(LOADADDR(.text) + SIZEOF(.text)) {
  • c/src/lib/libbsp/m68k/mcf52235/startup/linkcmds

    re2782684 rd60e760  
    135135
    136136    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     137    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     138    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    137139    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    138140    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    139     _TLS_Alignment = ALIGNOF (.tdata);
     141    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    140142
    141143    .data 0x20000400 : AT (_estuff)
  • c/src/lib/libbsp/m68k/mcf5225x/startup/linkcmds

    re2782684 rd60e760  
    135135
    136136    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     137    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     138    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    137139    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    138140    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    139     _TLS_Alignment = ALIGNOF (.tdata);
     141    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    140142
    141143    .data 0x20000400 : AT (_estuff)
  • c/src/lib/libbsp/m68k/mcf5235/startup/linkcmds

    re2782684 rd60e760  
    155155
    156156    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     157    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     158    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    157159    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    158160    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    159     _TLS_Alignment = ALIGNOF (.tdata);
     161    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    160162       
    161163        .data : {
  • c/src/lib/libbsp/m68k/mcf5235/startup/linkcmdsflash

    re2782684 rd60e760  
    159159
    160160    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     161    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     162    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    161163    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    162164    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    163     _TLS_Alignment = ALIGNOF (.tdata);
     165    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    164166       
    165167        .data 0x4000 : AT ( ADDR(.tdata) + SIZEOF ( .tdata ) )
  • c/src/lib/libbsp/m68k/mcf5235/startup/linkcmdsram

    re2782684 rd60e760  
    155155
    156156    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     157    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     158    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    157159    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    158160    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    159     _TLS_Alignment = ALIGNOF (.tdata);
     161    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    160162       
    161163        .data : {
  • c/src/lib/libbsp/m68k/mcf5329/startup/linkcmds

    re2782684 rd60e760  
    146146
    147147    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     148    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     149    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    148150    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    149151    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    150     _TLS_Alignment = ALIGNOF (.tdata);
     152    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    151153
    152154    .data :
  • c/src/lib/libbsp/m68k/mcf5329/startup/linkcmdsflash

    re2782684 rd60e760  
    142142
    143143    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     144    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     145    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    144146    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    145147    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    146     _TLS_Alignment = ALIGNOF (.tdata);
     148    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    147149
    148150    .data 0x40000500 : AT (_estuff)
  • c/src/lib/libbsp/m68k/mrm332/startup/linkcmds

    re2782684 rd60e760  
    156156  } > rom
    157157  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     158  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     159  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    158160  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    159161  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    160   _TLS_Alignment = ALIGNOF (.tdata);
     162  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    161163  .gcc_exc :
    162164  AT ( ADDR(.tdata) + SIZEOF( .tdata ) )
  • c/src/lib/libbsp/m68k/mvme136/startup/linkcmds

    re2782684 rd60e760  
    126126
    127127        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     128        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     129        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    128130        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    129131        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    130         _TLS_Alignment = ALIGNOF (.tdata);
     132        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    131133
    132134        .data : {
  • c/src/lib/libbsp/m68k/mvme147/startup/linkcmds

    re2782684 rd60e760  
    130130
    131131        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     132        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     133        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    132134        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    133135        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    134         _TLS_Alignment = ALIGNOF (.tdata);
     136        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    135137
    136138        .data : {
  • c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds

    re2782684 rd60e760  
    130130
    131131        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     132        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     133        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    132134        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    133135        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    134         _TLS_Alignment = ALIGNOF (.tdata);
     136        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    135137
    136138        .data : {
  • c/src/lib/libbsp/m68k/mvme162/startup/linkcmds

    re2782684 rd60e760  
    133133
    134134        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     135        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     136        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    135137        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    136138        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    137         _TLS_Alignment = ALIGNOF (.tdata);
     139        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    138140
    139141        .data : {
  • c/src/lib/libbsp/m68k/mvme167/startup/linkcmds

    re2782684 rd60e760  
    140140
    141141  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     142  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     143  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    142144  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    143145  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    144   _TLS_Alignment = ALIGNOF (.tdata);
     146  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    145147 
    146148  .data : {
  • c/src/lib/libbsp/m68k/ods68302/startup/debugger

    re2782684 rd60e760  
    3535  }
    3636  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     37  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     38  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    3739  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    3840  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    39   _TLS_Alignment = ALIGNOF (.tdata);
     41  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    4042
    4143  .vtable (ADDR(.text) + SIZEOF(.text))  :
  • c/src/lib/libbsp/m68k/ods68302/startup/linkcmds

    re2782684 rd60e760  
    142142
    143143        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     144        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     145        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    144146        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    145147        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    146         _TLS_Alignment = ALIGNOF (.tdata);
     148        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    147149
    148150
  • c/src/lib/libbsp/m68k/ods68302/startup/rom

    re2782684 rd60e760  
    3535  }
    3636  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     37  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     38  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    3739  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    3840  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    39   _TLS_Alignment = ALIGNOF (.tdata);
     41  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    4042 
    4143  .vtable 0 :
  • c/src/lib/libbsp/m68k/shared/startup/linkcmds.base

    re2782684 rd60e760  
    6868        } > REGION_TEXT AT > REGION_TEXT_LOAD
    6969        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     70        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     71        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    7072        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    7173        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    72         _TLS_Alignment = ALIGNOF (.tdata);
     74        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    7375        .preinit_array : ALIGN_WITH_INPUT {
    7476                PROVIDE_HIDDEN (__preinit_array_start = .);
  • c/src/lib/libbsp/m68k/sim68000/startup/linkcmds

    re2782684 rd60e760  
    123123
    124124        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     125        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     126        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    125127        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    126128        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    127         _TLS_Alignment = ALIGNOF (.tdata);
     129        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    128130
    129131        .data 0x80000 : AT (ADDR(.tdata) + SIZEOF (.tdata)) {
  • c/src/lib/libbsp/m68k/uC5282/startup/linkcmds

    re2782684 rd60e760  
    163163
    164164    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     165    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     166    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    165167    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    166168    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    167     _TLS_Alignment = ALIGNOF (.tdata);
     169    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    168170
    169171    .data : {
  • c/src/lib/libbsp/mips/csb350/startup/linkcmds

    re2782684 rd60e760  
    128128
    129129  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     130  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     131  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    130132  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    131133  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    132   _TLS_Alignment = ALIGNOF (.tdata);
     134  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    133135
    134136  .data :
  • c/src/lib/libbsp/mips/genmongoosev/startup/linkcmds

    re2782684 rd60e760  
    125125
    126126  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     127  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     128  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    127129  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    128130  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    129   _TLS_Alignment = ALIGNOF (.tdata);
     131  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    130132
    131133  .data :
  • c/src/lib/libbsp/mips/hurricane/startup/linkcmds

    re2782684 rd60e760  
    114114
    115115  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     116  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     117  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    116118  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    117119  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    118   _TLS_Alignment = ALIGNOF (.tdata);
     120  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    119121
    120122   _fdata = ALIGN(16);
  • c/src/lib/libbsp/mips/jmr3904/startup/linkcmds

    re2782684 rd60e760  
    110110
    111111  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     112  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     113  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    112114  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    113115  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    114   _TLS_Alignment = ALIGNOF (.tdata);
     116  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    115117
    116118   _fdata = ALIGN(16);
  • c/src/lib/libbsp/mips/malta/startup/linkcmds

    re2782684 rd60e760  
    110110
    111111  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     112  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     113  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    112114  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    113115  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    114   _TLS_Alignment = ALIGNOF (.tdata);
     116  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    115117
    116118   _fdata = ALIGN(16);
  • c/src/lib/libbsp/mips/rbtx4925/startup/linkcmds

    re2782684 rd60e760  
    114114
    115115  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     116  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     117  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    116118  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    117119  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    118   _TLS_Alignment = ALIGNOF (.tdata);
     120  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    119121
    120122   _fdata = ALIGN(16);
  • c/src/lib/libbsp/mips/rbtx4938/startup/linkcmds

    re2782684 rd60e760  
    114114
    115115  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     116  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     117  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    116118  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    117119  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    118   _TLS_Alignment = ALIGNOF (.tdata);
     120  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    119121
    120122   _fdata = ALIGN(16);
  • c/src/lib/libbsp/moxie/moxiesim/startup/linkcmds

    re2782684 rd60e760  
    144144  }
    145145  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     146  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     147  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    146148  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    147149  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    148   _TLS_Alignment = ALIGNOF (.tdata);
     150  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    149151  .eh_frame_hdr : { *(.eh_frame_hdr) }
    150152  /* Adjust the address for the data segment.  We want to adjust up to
  • c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds

    re2782684 rd60e760  
    213213
    214214    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     215    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     216    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    215217    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    216218    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    217     _TLS_Alignment = ALIGNOF (.tdata);
     219    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    218220
    219221    PROVIDE (__flash_rodata_start = LOADADDR(.rodata));
  • c/src/lib/libbsp/powerpc/beatnik/startup/linkcmds

    re2782684 rd60e760  
    107107  } >CODE
    108108  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     109  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     110  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    109111  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    110112  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    111   _TLS_Alignment = ALIGNOF (.tdata);
     113  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    112114  .sdata2         : { PROVIDE (_SDA2_BASE_ = 32768); *(.sdata2) *(.gnu.linkonce.s2.*)  }        > CODE
    113115  .sbss2          : {
  • c/src/lib/libbsp/powerpc/ep1a/startup/linkcmds

    re2782684 rd60e760  
    7676  }
    7777  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     78  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     79  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    7880  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    7981  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    80   _TLS_Alignment = ALIGNOF (.tdata);
     82  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    8183  .eh_frame       : { *(.eh_frame) }
    8284  _etext = .;
  • c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.base

    re2782684 rd60e760  
    133133        } > RAM
    134134        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     135        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     136        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    135137        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    136138        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    137         _TLS_Alignment = ALIGNOF (.tdata);
     139        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    138140
    139141        .sdata2 : {
  • c/src/lib/libbsp/powerpc/haleakala/startup/linkcmds

    re2782684 rd60e760  
    155155
    156156  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     157  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     158  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    157159  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    158160  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    159   _TLS_Alignment = ALIGNOF (.tdata);
     161  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    160162
    161163  .jcr : { KEEP (*(.jcr)) } >RAM
  • c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds

    re2782684 rd60e760  
    153153
    154154  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     155  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     156  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    155157  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    156158  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    157   _TLS_Alignment = ALIGNOF (.tdata);
     159  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    158160 
    159161  .rel.dyn        :
  • c/src/lib/libbsp/powerpc/mpc8260ads/startup/linkcmds

    re2782684 rd60e760  
    154154
    155155  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     156  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     157  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    156158  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    157159  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    158   _TLS_Alignment = ALIGNOF (.tdata);
     160  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    159161
    160162
  • c/src/lib/libbsp/powerpc/qemuppc/startup/linkcmds

    re2782684 rd60e760  
    8888  } >ROM =0
    8989  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     90  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     91  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    9092  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    9193  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    92   _TLS_Alignment = ALIGNOF (.tdata);
     94  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    9395
    9496  .rodata :
  • c/src/lib/libbsp/powerpc/score603e/startup/linkcmds

    re2782684 rd60e760  
    115115  } >RAM
    116116  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     117  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     118  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    117119  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    118120  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    119   _TLS_Alignment = ALIGNOF (.tdata);
     121  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    120122  .eh_frame       : { *(.eh_frame)              } >RAM
    121123  _etext = .;
  • c/src/lib/libbsp/powerpc/shared/startup/linkcmds

    re2782684 rd60e760  
    9494
    9595  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     96  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     97  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    9698  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    9799  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    98   _TLS_Alignment = ALIGNOF (.tdata);
     100  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    99101
    100102  /* Adjust the address for the data segment.  We want to adjust up to
  • c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base

    re2782684 rd60e760  
    120120        } > REGION_RODATA AT > REGION_RODATA_LOAD
    121121        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     122        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     123        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    122124        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    123125        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    124         _TLS_Alignment = ALIGNOF (.tdata);
     126        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    125127        .preinit_array : ALIGN_WITH_INPUT {
    126128                PROVIDE_HIDDEN (__preinit_array_start = .);
  • c/src/lib/libbsp/powerpc/ss555/startup/linkcmds

    re2782684 rd60e760  
    153153  }
    154154  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     155  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     156  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    155157  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    156158  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    157   _TLS_Alignment = ALIGNOF (.tdata);
     159  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    158160
    159161  /*
  • c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.base

    re2782684 rd60e760  
    127127
    128128        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     129        _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     130        _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    129131        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    130132        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    131         _TLS_Alignment = ALIGNOF (.tdata);
     133        _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    132134
    133135        .sdata2 : {
  • c/src/lib/libbsp/powerpc/virtex4/startup/linkcmds

    re2782684 rd60e760  
    108108
    109109  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     110  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     111  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    110112  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    111113  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    112   _TLS_Alignment = ALIGNOF (.tdata);
     114  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    113115
    114116  /* Initialised small data addressed as offsets from r2 */
  • c/src/lib/libbsp/powerpc/virtex5/startup/linkcmds

    re2782684 rd60e760  
    108108
    109109  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     110  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     111  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    110112  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    111113  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    112   _TLS_Alignment = ALIGNOF (.tdata);
     114  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    113115
    114116  /* Initialised small data addressed as offsets from r2 */
  • c/src/lib/libbsp/sh/gensh1/startup/linkcmds

    re2782684 rd60e760  
    143143  } > ram
    144144  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     145  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     146  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    145147  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    146148  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    147   __TLS_Alignment = ALIGNOF (.tdata);
     149  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    148150  /* Adjust the address for the data segment.  We want to adjust up to
    149151     the same address within the page on the next page up.  */
  • c/src/lib/libbsp/sh/gensh2/startup/linkcmds

    re2782684 rd60e760  
    154154  } > ram
    155155  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     156  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     157  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    156158  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    157159  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    158   __TLS_Alignment = ALIGNOF (.tdata);
     160  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    159161  /* Adjust the address for the data segment.  We want to adjust up to
    160162     the same address within the page on the next page up.  */
  • c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram

    re2782684 rd60e760  
    153153  } > ram
    154154  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     155  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     156  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    155157  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    156158  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    157   __TLS_Alignment = ALIGNOF (.tdata);
     159  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    158160  /* Adjust the address for the data segment.  We want to adjust up to
    159161     the same address within the page on the next page up.  */
  • c/src/lib/libbsp/sh/gensh2/startup/linkcmds.rom

    re2782684 rd60e760  
    154154  } > ram
    155155  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     156  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     157  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    156158  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    157159  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    158   __TLS_Alignment = ALIGNOF (.tdata);
     160  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    159161  /* Adjust the address for the data segment.  We want to adjust up to
    160162     the same address within the page on the next page up.  */
  • c/src/lib/libbsp/sh/gensh4/startup/linkcmds

    re2782684 rd60e760  
    105105  } > ram
    106106  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     107  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     108  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    107109  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    108110  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    109   __TLS_Alignment = ALIGNOF (.tdata);
     111  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    110112  .ctors   :
    111113  {
  • c/src/lib/libbsp/sh/gensh4/startup/linkcmds.rom

    re2782684 rd60e760  
    117117  } > rom
    118118  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     119  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     120  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    119121  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    120122  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    121   __TLS_Alignment = ALIGNOF (.tdata);
     123  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    122124  .ctors   :
    123125  {
  • c/src/lib/libbsp/sh/gensh4/startup/linkcmds.rom2ram

    re2782684 rd60e760  
    104104  } > ram
    105105  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     106  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     107  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    106108  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    107109  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    108   __TLS_Alignment = ALIGNOF (.tdata);
     110  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    109111  .ctors   :  AT(LOADADDR(.rodata) + SIZEOF(.rodata))
    110112  {
  • c/src/lib/libbsp/sh/shsim/startup/linkcmds

    re2782684 rd60e760  
    141141  } > ram
    142142  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     143  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     144  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    143145  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    144146  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    145   __TLS_Alignment = ALIGNOF (.tdata);
     147  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    146148  /* Adjust the address for the data segment.  We want to adjust up to
    147149     the same address within the page on the next page up.  */
  • c/src/lib/libbsp/sh/shsim/startup/linkcmds.sim

    re2782684 rd60e760  
    135135  } > ram
    136136  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     137  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     138  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    137139  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    138140  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    139   __TLS_Alignment = ALIGNOF (.tdata);
     141  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    140142  /* Adjust the address for the data segment.  We want to adjust up to
    141143     the same address within the page on the next page up.  */
  • c/src/lib/libbsp/sparc/shared/startup/linkcmds.base

    re2782684 rd60e760  
    118118  } > ram
    119119  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     120  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     121  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    120122  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    121123  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    122   _TLS_Alignment = ALIGNOF (.tdata);
     124  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    123125  .rtemsroset : {
    124126    /* for pre rtems-libbsd FreeBSD code */
  • c/src/lib/libbsp/sparc64/shared/startup/linkcmds

    re2782684 rd60e760  
    161161  } > ram
    162162  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     163  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     164  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    163165  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    164166  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    165   _TLS_Alignment = ALIGNOF (.tdata);
     167  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    166168 
    167169  .data   : AT (ADDR (.tbss) + SIZEOF (.tbss))
  • c/src/lib/libbsp/v850/gdbv850sim/startup/linkcmds

    re2782684 rd60e760  
    103103  }
    104104  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
     105  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
     106  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
    105107  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
    106108  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
    107   __TLS_Alignment = ALIGNOF (.tdata);
     109  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    108110  .data         :
    109111  {
  • doc/cpu_supplement/general.t

    re2782684 rd60e760  
    356356@}
    357357_TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
     358_TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
     359_TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
    358360_TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
    359361_TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
    360 _TLS_Alignment = ALIGNOF (.tdata);
     362_TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
    361363@end example
    362364
Note: See TracChangeset for help on using the changeset viewer.