* [Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC
2008-11-14 15:54 [Bug target/38118] New: " ro at gcc dot gnu dot org
@ 2008-11-14 19:10 ` ebotcazou at gcc dot gnu dot org
2008-11-17 14:26 ` ro at techfak dot uni-bielefeld dot de
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-14 19:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from ebotcazou at gcc dot gnu dot org 2008-11-14 19:08 -------
*** This bug has been marked as a duplicate of 29987 ***
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38118
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC
2008-11-14 15:54 [Bug target/38118] New: " ro at gcc dot gnu dot org
2008-11-14 19:10 ` [Bug target/38118] " ebotcazou at gcc dot gnu dot org
@ 2008-11-17 14:26 ` ro at techfak dot uni-bielefeld dot de
2008-11-18 8:25 ` ebotcazou at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2008-11-17 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ro at techfak dot uni-bielefeld dot de 2008-11-17 14:25 -------
Subject: Re: gcc emits non-TLS data as TLS on Solaris 11/SPARC
I'm not completely sure this is a bug in Sun as. If you consider the
assembler code for my testcase produced by gcc:
.global tsd
.section ".tbss",#alloc,#write,#tls
.align 4
.type tsd, #tls_object
.size tsd, 4
tsd:
.skip 4
.common non_tsd,4,4
versus what Studio 12 cc produces:
.section ".bss",#alloc,#write
.common non_tsd,4,4
.section ".tbss",#alloc,#write,#tls
.common tsd,4,4
you see that gcc lacks the section switching between non_tsd and tsd.
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38118
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC
2008-11-14 15:54 [Bug target/38118] New: " ro at gcc dot gnu dot org
2008-11-14 19:10 ` [Bug target/38118] " ebotcazou at gcc dot gnu dot org
2008-11-17 14:26 ` ro at techfak dot uni-bielefeld dot de
@ 2008-11-18 8:25 ` ebotcazou at gcc dot gnu dot org
2008-11-18 9:40 ` jakub at gcc dot gnu dot org
2010-03-24 18:50 ` ro at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-11-18 8:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ebotcazou at gcc dot gnu dot org 2008-11-18 08:24 -------
> I'm not completely sure this is a bug in Sun as. If you consider the
> assembler code for my testcase produced by gcc:
>
> .global tsd
> .section ".tbss",#alloc,#write,#tls
> .align 4
> .type tsd, #tls_object
> .size tsd, 4
> tsd:
> .skip 4
> .common non_tsd,4,4
>
> versus what Studio 12 cc produces:
>
> .section ".bss",#alloc,#write
> .common non_tsd,4,4
> .section ".tbss",#alloc,#write,#tls
> .common tsd,4,4
>
> you see that gcc lacks the section switching between non_tsd and tsd.
OK, this makes sense, but I'd suggest discussing that under PR 29987.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38118
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC
2008-11-14 15:54 [Bug target/38118] New: " ro at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-11-18 8:25 ` ebotcazou at gcc dot gnu dot org
@ 2008-11-18 9:40 ` jakub at gcc dot gnu dot org
2010-03-24 18:50 ` ro at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-18 9:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2008-11-18 09:39 -------
If you don't want to call it a bug, call it at least a misfeature.
Given that Solaris as supports .tls_common directive, having .common directive
behave differently depending on whether current section is .tbss (apparently
comparison by name, flags don't matter and when in .tdata .common behaves
normally) or not is very surprising.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38118
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/38118] gcc emits non-TLS data as TLS on Solaris 11/SPARC
2008-11-14 15:54 [Bug target/38118] New: " ro at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-11-18 9:40 ` jakub at gcc dot gnu dot org
@ 2010-03-24 18:50 ` ro at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: ro at gcc dot gnu dot org @ 2010-03-24 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ro at gcc dot gnu dot org 2010-03-24 18:50 -------
Subject: Bug 38118
Author: ro
Date: Wed Mar 24 18:49:49 2010
New Revision: 157705
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157705
Log:
* configure.ac (i[34567]86-*-*): Handle Solaris 2/x86 TLS support
and Sun as TLS syntax.
(TLS_SECTION_ASM_FLAG) [on_solaris && !gas_flag]: Define.
* configure: Regenerate.
* config.in: Regenerate.
* varasm.c (TLS_SECTION_ASM_FLAG): Define default.
(default_elf_asm_named_section): Use it.
* config/i386/i386.c (output_pic_addr_const): Lowercase @DTPOFF.
(i386_output_dwarf_dtprel): Likewise.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @GOTTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @GOTNTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @INDNTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @NTPOFF.
(output_addr_const_extra): Likewise.
(output_pic_addr_const): Lowercase @TPOFF.
(output_addr_const_extra): Likewise.
* config/i386/i386.md (*tls_global_dynamic_32_gnu): Lowercase
@TLSGD.
(*tls_global_dynamic_64): Likewise.
(*tls_local_dynamic_base_32_gnu): Lowercase @TLSLDM.
(*tls_local_dynamic_base_64): Lowercase @TLSLD.
* defaults.h (TLS_COMMON_ASM_OP): Provide default.
(ASM_OUTPUT_TLS_COMMON): Use it.
* config/i386/sol2-gas.h (TLS_COMMON_ASM_OP): Undef.
PR target/38118
* config.gcc (sparc*-*-solaris2*) [$gas=yes]: Add usegas.h to
tm_file.
* config/sparc/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Move ...
* config/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): ... here.
* config/i386/sol2-10.h (ASM_OUTPUT_ALIGNED_COMMON): Redefine.
* config/i386/sol2.h (TARGET_SUN_TLS): Redefine.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/config.in
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.md
trunk/gcc/config/i386/sol2-10.h
trunk/gcc/config/i386/sol2-gas.h
trunk/gcc/config/i386/sol2.h
trunk/gcc/config/sol2.h
trunk/gcc/config/sparc/sol2.h
trunk/gcc/configure
trunk/gcc/configure.ac
trunk/gcc/defaults.h
trunk/gcc/varasm.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38118
^ permalink raw reply [flat|nested] 6+ messages in thread