aboutsummaryrefslogtreecommitdiff
path: root/gcc/output.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-09-11 18:50:05 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2001-09-11 18:50:05 +0200
commit201556f0e005802b8ebb206a193a6feb55a555af (patch)
tree1e64917dd6eadf802b7c67e6f7384cc9fc03f1ae /gcc/output.h
parentd21b1cb8741f7dfbeab6a456d67b322312933a8c (diff)
downloadgcc-201556f0e005802b8ebb206a193a6feb55a555af.zip
gcc-201556f0e005802b8ebb206a193a6feb55a555af.tar.gz
gcc-201556f0e005802b8ebb206a193a6feb55a555af.tar.bz2
configure.in: Check whether assembler supports section merging.
* configure.in: Check whether assembler supports section merging. * config.in: Rebuilt. * configure: Rebuilt. * varasm.c (variable_section, output_constant_pool): Pass alignment to SELECT_SECTION and SELECT_RTX_SECTION. (mergeable_string_section): New. (mergeable_constant_section): New. (default_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * output.h (mergeable_string_section): New. (mergeable_constant_section): New. (SECTION_MERGE, SECTION_STRINGS, SECTION_ENTSIZE): Define. * toplev.c (flag_merge_constants): New. (f_options): Add -fmerge-constants and -fmerge-all-constants options. (toplev_main): Default to -fno-merge-constants if not optimizing. * flags.h (flag_merge_constants): Add extern. * invoke.texi (-fmerge-constants, -fmerge-all-constants): Document. * tm.texi (SELECT_SECTION, SELECT_RTX_SECTION): Document added third argument. * config/elfos.h (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/ia64/sysv4.h (SELECT_RTX_SECTION, SELECT_SECTION): Add third macro argument. Put constant into special SHF_MERGE sections if the linker should attempt to merge duplicates. * config/alpha/elf.h: Likewise. (ASM_SECTION_START_OP, ASM_OUTPUT_SECTION_START): Define if assembler has working .subsection -1 support. * config/nextstep.h: Add third argument to SELECT_RTX_SECTION and SELECT_SECTION. * config/svr3.h: Likewise. * config/darwin.h: Likewise. * config/arm/aof.h: Likewise. * config/arm/linux-elf.h: Likewise. * config/avr/avr.h: Likewise. * config/c4x/c4x.h: Likewise. * config/d30v/d30v.h: Likewise. * config/i386/dgux.h: Likewise. * config/i386/osfrose.h: Likewise. * config/i386/sco5.h: Likewise. * config/i386/svr3gas.h: Likewise. * config/ia64/aix.h: Likewise. * config/m32r/m32r.h: Likewise. * config/m68k/m68k.h: Likewise. * config/m88k/dgux.h: Likewise. * config/m88k/m88k.h: Likewise. * config/mcore/mcore-pe.h: Likewise. * config/mips/mips.h: Likewise. * config/pa/pa.h: Likewise. * config/pa/pa-linux.h: Likewise. * config/romp/romp.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/xcoff.h: Likewise. * config/s390/linux.h: Likewise. * config/sparc/sparc.h: Likewise. * config/sparc/sysv4.h: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.h: Likewise. * config/vax/vms.h: Likewise. * config/arm/arm.c (arm_elf_asm_named_section): Output SECTION_MERGE and SECTION_STRINGS flags plus SECTION_ENTSIZE entity size. * config/sparc/sparc.c (sparc_elf_asm_named_section): Use default_elf_asm_named_section for SHF_MERGE sections. * com.c (ffe_init_options): Default to -fmerge-all-constants if optimizing. From-SVN: r45548
Diffstat (limited to 'gcc/output.h')
-rw-r--r--gcc/output.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/gcc/output.h b/gcc/output.h
index 2edfb05..f1722f1 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -207,6 +207,15 @@ extern void function_section PARAMS ((tree));
/* Tell assembler to switch to the section for the exception table. */
extern void exception_section PARAMS ((void));
+/* Tell assembler to switch to the section for string merging. */
+extern void mergeable_string_section PARAMS ((tree, unsigned HOST_WIDE_INT,
+ unsigned int));
+
+/* Tell assembler to switch to the section for constant merging. */
+extern void mergeable_constant_section PARAMS ((enum machine_mode,
+ unsigned HOST_WIDE_INT,
+ unsigned int));
+
/* Declare DECL to be a weak symbol. */
extern void declare_weak PARAMS ((tree));
#endif /* TREE_CODE */
@@ -450,14 +459,18 @@ extern void default_function_pro_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
extern void no_asm_to_stream PARAMS ((FILE *));
/* Flags controling properties of a section. */
-#define SECTION_CODE 1 /* contains code */
-#define SECTION_WRITE 2 /* data is writable */
-#define SECTION_DEBUG 4 /* contains debug data */
-#define SECTION_LINKONCE 8 /* is linkonce */
-#define SECTION_SMALL 16 /* contains "small data" */
-#define SECTION_BSS 32 /* contains zeros only */
-#define SECTION_FORGET 64 /* forget that we've entered the section */
-#define SECTION_MACH_DEP 128 /* subsequent bits reserved for target */
+#define SECTION_ENTSIZE 0x000ff /* entity size in section */
+#define SECTION_CODE 0x00100 /* contains code */
+#define SECTION_WRITE 0x00200 /* data is writable */
+#define SECTION_DEBUG 0x00400 /* contains debug data */
+#define SECTION_LINKONCE 0x00800 /* is linkonce */
+#define SECTION_SMALL 0x01000 /* contains "small data" */
+#define SECTION_BSS 0x02000 /* contains zeros only */
+#define SECTION_FORGET 0x04000 /* forget that we've entered the section */
+#define SECTION_MERGE 0x08000 /* contains mergeable data */
+#define SECTION_STRINGS 0x10000 /* contains zero terminated strings without
+ embedded zeros */
+#define SECTION_MACH_DEP 0x20000 /* subsequent bits reserved for target */
extern unsigned int get_named_section_flags PARAMS ((const char *));
extern bool set_named_section_flags PARAMS ((const char *, unsigned int));