This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Named bss sections
- To: egcs at cygnus dot com
- Subject: Named bss sections
- From: chris at lslsun dot epfl dot ch (Christian Iseli)
- Date: Tue, 2 Sep 1997 16:15:45 +0200
In the gcc snapshot distributed by Cygnus with the cygwin32 tools, there was support
for named bss sections which had been added by someone at Cygnus. This support
has disappeared from egcs. Was there any reason? If not, the following patch should
re-enable this.
Cheers,
Christian
* varasm.c (assemble_variable): Enable named bss sections.
*** varasm.c.orig Mon Aug 11 17:57:14 1997
--- varasm.c Tue Sep 2 10:05:38 1997
*************** assemble_variable (decl, top_level, at_e
*** 1350,1355 ****
--- 1350,1360 ----
/* Handle uninitialized definitions. */
if ((DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node)
+ /* Don't use bss if target supports attribute section and decl wants
+ to be in a specific section. */
+ #ifdef ASM_OUTPUT_SECTION_NAME
+ && DECL_SECTION_NAME (decl) == NULL_TREE
+ #endif
/* If the target can't output uninitialized but not common global data
in .bss, then we have to use .data. */
#if ! defined (ASM_OUTPUT_BSS) && ! defined (ASM_OUTPUT_ALIGNED_BSS)