elf.h (ASM_OUTPUT_ALIGNED_BSS): Put the symbol in .sbss if appropriate.
authorGeoff Keating <geoffk@cygnus.com>
Fri, 24 Sep 1999 02:01:08 +0000 (02:01 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 24 Sep 1999 02:01:08 +0000 (02:01 +0000)
* config/mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Put the symbol
in .sbss if appropriate.
(EXTRA_SECTION_FUNCTIONS): Add sbss.
(SBSS_SECTION_ASM_OP): New macro.
* config/mips/linux.h (EXTRA_SECTION_FUNCTIONS): Add sbss.
(EXTRA_SECTIONS): Add in_sbss.
* config/mips/mips.h: Prototype sbss_section.

From-SVN: r29648

gcc/ChangeLog
gcc/config/mips/elf.h
gcc/config/mips/linux.h
gcc/config/mips/mips.h

index c10d22af4742406cecd2356653a216f408f38ff6..35dd192afa008e8593983452c5740057cbd94224 100644 (file)
@@ -1,3 +1,13 @@
+Fri Sep 24 11:57:06 1999  Geoffrey Keating  <geoffk@cygnus.com>
+
+       * config/mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Put the symbol
+       in .sbss if appropriate.
+       (EXTRA_SECTION_FUNCTIONS): Add sbss.
+       (SBSS_SECTION_ASM_OP): New macro.
+       * config/mips/linux.h (EXTRA_SECTION_FUNCTIONS): Add sbss.
+       (EXTRA_SECTIONS): Add in_sbss.
+       * config/mips/mips.h: Prototype sbss_section.
+
 Thu Sep 23 18:18:55 1999  Mark Mitchell  <mark@codesourcery.com>
 
        * stmt.c (expand_start_bindings): Don't allow cleanup isntructions
index 43f92e81969dc47a3369486ad8a2891c1c2d836e..6fbc432afe071154683c39c688288951eb7d4b6f 100644 (file)
@@ -101,6 +101,8 @@ do {                                                                \
 #define BSS_SECTION_ASM_OP     ".section\t.bss"
 #endif
 
+#define SBSS_SECTION_ASM_OP    "\t.section .sbss"
+
 /* Like `ASM_OUTPUT_BSS' except takes the required alignment as a
    separate, explicit argument.  If you define this macro, it is used
    in place of `ASM_OUTPUT_BSS', and gives you more flexibility in
@@ -111,7 +113,17 @@ do {                                                               \
    `varasm.c' when defining this macro. */
 #ifndef ASM_OUTPUT_ALIGNED_BSS
 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
+do {                                                                   \
+  ASM_GLOBALIZE_LABEL (FILE, NAME);                                    \
+  if (SIZE > 0 && SIZE <= mips_section_threshold)                      \
+    sbss_section ();                                                   \
+  else                                                                 \
+    bss_section ();                                                    \
+  ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT));         \
+  last_assemble_variable_decl = DECL;                                  \
+  ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL);                          \
+  ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1);                             \
+} while (0)
 #endif
 
 /* These macros generate the special .type and .size directives which
@@ -281,7 +293,7 @@ do {                                                                           \
 /* A list of other sections which the compiler might be "in" at any
    given time.  */
 #undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_sdata, in_rdata, in_ctors, in_dtors
+#define EXTRA_SECTIONS in_sdata, in_sbss, in_rdata, in_ctors, in_dtors
  
 #define INVOKE__main
 #define NAME__MAIN "__gccmain"
@@ -290,6 +302,7 @@ do {                                                                           \
 #undef EXTRA_SECTION_FUNCTIONS
 #define EXTRA_SECTION_FUNCTIONS                                         \
   SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+  SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
   SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP) \
   SECTION_FUNCTION_TEMPLATE(ctors_section, in_ctors, CTORS_SECTION_ASM_OP) \
   SECTION_FUNCTION_TEMPLATE(dtors_section, in_dtors, DTORS_SECTION_ASM_OP)
index a497231fcaf3100c65152cca4ed784b3f888a2d7..2a780fe201601ed8f79ae8d9c1152fd122d83b9d 100644 (file)
@@ -82,7 +82,7 @@ Boston, MA 02111-1307, USA.  */
 #undef DTORS_SECTION_ASM_OP
 
 #undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_sdata, in_rdata
+#define EXTRA_SECTIONS in_sdata, in_sbss, in_rdata
 
 #undef INVOKE__main
 #undef NAME__MAIN
@@ -91,6 +91,7 @@ Boston, MA 02111-1307, USA.  */
 #undef EXTRA_SECTION_FUNCTIONS
 #define EXTRA_SECTION_FUNCTIONS                                         \
   SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
+  SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
   SECTION_FUNCTION_TEMPLATE(rdata_section, in_rdata, RDATA_SECTION_ASM_OP)
 
 #undef ASM_OUTPUT_CONSTRUCTOR
index af23615ef506f579120bae09a8294425f1838795..c826d398261bf7d0fe7a037b33f2f4dcd4fa9889 100644 (file)
@@ -163,6 +163,7 @@ extern struct rtx_def *mips16_gp_pseudo_rtx; /* psuedo reg holding $gp */
 /* Functions to change what output section we are using.  */
 extern void            rdata_section PARAMS ((void));
 extern void            sdata_section PARAMS ((void));
+extern void            sbss_section PARAMS ((void));
 
 /* Stubs for half-pic support if not OSF/1 reference platform.  */