From adb75db0677f4f8088e5ede6c2457be0337b33d6 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 6 Jan 2011 19:00:10 +0000 Subject: 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 --- gcc/config/sol2.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/config/sol2.h') diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index 75f4675..aace524 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -277,7 +277,7 @@ __enable_execute_stack (void *addr) \ } \ 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. */ #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ @@ -285,8 +285,7 @@ __enable_execute_stack (void *addr) \ { \ if (TARGET_SUN_TLS \ && in_section \ - && ((in_section->common.flags & (SECTION_TLS | SECTION_BSS)) \ - == (SECTION_TLS | SECTION_BSS))) \ + && ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \ switch_to_section (bss_section); \ fprintf ((FILE), "%s", COMMON_ASM_OP); \ assemble_name ((FILE), (NAME)); \ -- cgit v1.1