aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1996-03-01 20:34:12 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1996-03-01 20:34:12 +0000
commitfff4998bc9872fac229a83563e4759e811ab360a (patch)
tree0e52f51f5112e8609835ce5bac90b58d0ed52130
parentcac58785f71c9ba3fd3de7e1dd065b0cf539936a (diff)
downloadgcc-fff4998bc9872fac229a83563e4759e811ab360a.zip
gcc-fff4998bc9872fac229a83563e4759e811ab360a.tar.gz
gcc-fff4998bc9872fac229a83563e4759e811ab360a.tar.bz2
Define ASM_OUTPUT_ALIGNED_BSS
From-SVN: r11397
-rw-r--r--gcc/config/rs6000/sysv4.h44
-rw-r--r--gcc/config/rs6000/win-nt.h36
2 files changed, 51 insertions, 29 deletions
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index e91c7ee..a043e3e 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -282,10 +282,13 @@ do { \
/* Use ELF style section commands. */
#undef TEXT_SECTION_ASM_OP
-#define TEXT_SECTION_ASM_OP "\t.section\t\".text\""
+#define TEXT_SECTION_ASM_OP "\t.section \".text\""
#undef DATA_SECTION_ASM_OP
-#define DATA_SECTION_ASM_OP "\t.section\t\".data\""
+#define DATA_SECTION_ASM_OP "\t.section \".data\""
+
+#undef BSS_SECTION_ASM_OP
+#define BSS_SECTION_ASM_OP "\t.section \".bss\""
/* Besides the usual ELF sections, we need a toc section. */
#undef EXTRA_SECTIONS
@@ -350,12 +353,12 @@ toc_section () \
} \
}
-#define TOC_SECTION_ASM_OP "\t.section\t\".got\",\"aw\""
-#define MINIMAL_TOC_SECTION_ASM_OP "\t.section\t\".got1\",\"aw\""
+#define TOC_SECTION_ASM_OP "\t.section \".got\",\"aw\""
+#define MINIMAL_TOC_SECTION_ASM_OP "\t.section \".got1\",\"aw\""
-#define SDATA_SECTION_ASM_OP "\t.section\t\".sdata\",\"aw\""
-#define SDATA2_SECTION_ASM_OP "\t.section\t\".sdata2\",\"a\""
-#define SBSS_SECTION_ASM_OP "\t.section\t\".sbss\",\"aw\",@nobits"
+#define SDATA_SECTION_ASM_OP "\t.section \".sdata\",\"aw\""
+#define SDATA2_SECTION_ASM_OP "\t.section \".sdata2\",\"a\""
+#define SBSS_SECTION_ASM_OP "\t.section \".sbss\",\"aw\",@nobits"
#define SDATA_SECTION_FUNCTION \
void \
@@ -517,19 +520,20 @@ extern int rs6000_pic_labelno;
#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
do { \
if (TARGET_SDATA && (SIZE) > 0 && (SIZE) <= g_switch_value) \
- { \
- sbss_section (); \
- ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
- ASM_OUTPUT_LABEL (FILE, NAME); \
- ASM_OUTPUT_SKIP (FILE, SIZE); \
- } \
+ sbss_section (); \
else \
- { \
- fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \
- assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), "\n"); \
- ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
- } \
+ bss_section (); \
+ \
+ ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
+ ASM_OUTPUT_LABEL (FILE, NAME); \
+ ASM_OUTPUT_SKIP (FILE, SIZE); \
+} while (0)
+
+/* Describe how to emit unitialized external linkage items */
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, NAME, SIZE, ALIGN) \
+do { \
+ ASM_GLOBALIZE_LABEL (FILE, NAME); \
+ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
} while (0)
/* Pass various options to the assembler */
@@ -589,7 +593,7 @@ do { \
fprintf (FILE, "\t.long ("); \
output_addr_const (FILE, (VALUE)); \
fprintf (FILE, ")@fixup\n"); \
- fprintf (FILE, "\t.section\t\".fixup\",\"aw\"\n"); \
+ fprintf (FILE, "\t.section \".fixup\",\"aw\"\n"); \
ASM_OUTPUT_ALIGN (FILE, 2); \
fprintf (FILE, "\t.long\t%s\n", p); \
fprintf (FILE, "\t.previous\n"); \
diff --git a/gcc/config/rs6000/win-nt.h b/gcc/config/rs6000/win-nt.h
index de34f97..c835634 100644
--- a/gcc/config/rs6000/win-nt.h
+++ b/gcc/config/rs6000/win-nt.h
@@ -138,7 +138,7 @@ Boston, MA 02111-1307, USA. */
#undef READONLY_DATA_SECTION
#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS toc, bss
+#define EXTRA_SECTIONS toc
/* Define the routines to implement these extra sections. */
@@ -180,14 +180,28 @@ toc_section () \
fprintf ((FILE), ",%d\n", (SIZE)); } while (0)
/* This says how to output an assembler line
- to define a local common symbol. */
-
-#undef ASM_OUTPUT_LOCAL
-#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \
- do { fputs ("\t.lcomm \t", (FILE)); \
- assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), ",%d\n", (SIZE)); \
- } while (0)
+ to define an aligned local common symbol. */
+
+#undef ASM_OUTPUT_ALIGNED_LOCAL
+#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
+do { \
+ bss_section (); \
+ ASM_OUTPUT_ALIGN (FILE, exact_log2 (ALIGN / BITS_PER_UNIT)); \
+ ASM_OUTPUT_LABEL (FILE, NAME); \
+ ASM_OUTPUT_SKIP (FILE, SIZE); \
+} while (0)
+
+/* Describe how to emit unitialized external linkage items */
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, NAME, SIZE, ALIGN) \
+do { \
+ ASM_GLOBALIZE_LABEL (FILE, NAME); \
+ ASM_OUTPUT_ALIGNED_LOCAL (FILE, NAME, SIZE, ALIGN); \
+} while (0)
+
+/* This says out to put a global symbol in the BSS section */
+#undef ASM_OUTPUT_ALIGNED_BSS
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, NAME, SIZE, ALIGN) \
+ asm_output_aligned_bss ((FILE), (NAME), (SIZE), (ALIGN))
/* Stuff to force fit us into the Motorola PPC assembler */
@@ -321,6 +335,10 @@ toc_section () \
#undef DATA_SECTION_ASM_OP
#define DATA_SECTION_ASM_OP "\t.data"
+/* Output to the bss section. */
+#undef BSS_SECTION_ASM_OP
+#define BSS_SECTION_ASM_OP "\t.section .bss"
+
/* Text to write out after a CALL that may be replaced by glue code by
the loader. The motorola asm demands that, for dll support, a .znop
be issued after a bl instruction, and the symbol on the .znop is the