summaryrefslogtreecommitdiff
path: root/gcc/config/svr4.h
diff options
context:
space:
mode:
authorclm <clm@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-28 06:24:06 +0000
committerclm <clm@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-28 06:24:06 +0000
commite70c91fb35325cd9dae60458f12f394a83fc324a (patch)
tree94a5b1127023dfb6300c924e2c3d5cf44307f9df /gcc/config/svr4.h
parent092922f17f5eb6d88e5f4223c695f666343b705a (diff)
downloadgcc-e70c91fb35325cd9dae60458f12f394a83fc324a.tar.gz
* flags.h: Add flag_data_sections.
* toplev.c: Add option -fdata-sections. Add flag_data_sections. (compile_file): Error if flag_data_sections not supported. * varasm.c (assemble_variable): Handle flag_data_sections. * config/svr4.h: Modify prefixes for UNIQUE_SECTION_NAME. * config/mips/elf.h: Likewise. * config/mips/elf64.h: Likewise. * invoke.texi: Describe -fdata-sections. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22619 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/svr4.h')
-rw-r--r--gcc/config/svr4.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h
index 47376974358..ef7a1d9df84 100644
--- a/gcc/config/svr4.h
+++ b/gcc/config/svr4.h
@@ -655,7 +655,15 @@ do { \
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
\
if (! DECL_ONE_ONLY (DECL)) \
- prefix = "."; \
+ { \
+ prefix = "."; \
+ if (TREE_CODE (DECL) == FUNCTION_DECL) \
+ prefix = ".text."; \
+ else if (DECL_READONLY_SECTION (DECL, RELOC)) \
+ prefix = ".rodata."; \
+ else \
+ prefix = ".data."; \
+ } \
else if (TREE_CODE (DECL) == FUNCTION_DECL) \
prefix = ".gnu.linkonce.t."; \
else if (DECL_READONLY_SECTION (DECL, RELOC)) \
@@ -669,7 +677,6 @@ do { \
\
DECL_SECTION_NAME (DECL) = build_string (len, string); \
} while (0)
-
/* A C statement (sans semicolon) to output an element in the table of
global constructors. */
#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \