Commit adb75db0 by Rainer Orth Committed by Rainer Orth

re PR target/38118 (gcc emits non-TLS data as TLS on Solaris 11/SPARC)

	PR target/38118
	* config/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Also switch to .bss
	if coming from .tdata.
	* config/i386/sol2-10.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise.

From-SVN: r168550
parent 74b51535
2011-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/38118
* config/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Also switch to .bss
if coming from .tdata.
* config/i386/sol2-10.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise.
2011-01-06 Jan Hubicka <jh@suse.cz> 2011-01-06 Jan Hubicka <jh@suse.cz>
PR lto/47188 PR lto/47188
......
...@@ -58,8 +58,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -58,8 +58,7 @@ along with GCC; see the file COPYING3. If not see
{ \ { \
if (TARGET_SUN_TLS \ if (TARGET_SUN_TLS \
&& in_section \ && in_section \
&& ((in_section->common.flags & (SECTION_TLS | SECTION_BSS)) \ && ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \
== (SECTION_TLS | SECTION_BSS))) \
switch_to_section (bss_section); \ switch_to_section (bss_section); \
x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); \ x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); \
} \ } \
......
...@@ -277,7 +277,7 @@ __enable_execute_stack (void *addr) \ ...@@ -277,7 +277,7 @@ __enable_execute_stack (void *addr) \
} \ } \
while (0) while (0)
/* Solaris 'as' has a bug: a .common directive in .tbss section /* Solaris 'as' has a bug: a .common directive in .tbss or .tdata section
behaves as .tls_common rather than normal non-TLS .common. */ behaves as .tls_common rather than normal non-TLS .common. */
#undef ASM_OUTPUT_ALIGNED_COMMON #undef ASM_OUTPUT_ALIGNED_COMMON
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
...@@ -285,8 +285,7 @@ __enable_execute_stack (void *addr) \ ...@@ -285,8 +285,7 @@ __enable_execute_stack (void *addr) \
{ \ { \
if (TARGET_SUN_TLS \ if (TARGET_SUN_TLS \
&& in_section \ && in_section \
&& ((in_section->common.flags & (SECTION_TLS | SECTION_BSS)) \ && ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \
== (SECTION_TLS | SECTION_BSS))) \
switch_to_section (bss_section); \ switch_to_section (bss_section); \
fprintf ((FILE), "%s", COMMON_ASM_OP); \ fprintf ((FILE), "%s", COMMON_ASM_OP); \
assemble_name ((FILE), (NAME)); \ assemble_name ((FILE), (NAME)); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment