summaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-11 16:50:05 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-11 16:50:05 +0000
commitbb2821c04b6546dd5f014b99ab45d6ef5c55f874 (patch)
tree1e64917dd6eadf802b7c67e6f7384cc9fc03f1ae /gcc/config/arm
parent1be91cc480957c46afcce1ceca0f0678af0a28ce (diff)
downloadgcc-bb2821c04b6546dd5f014b99ab45d6ef5c55f874.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45548 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/aof.h2
-rw-r--r--gcc/config/arm/arm.c12
-rw-r--r--gcc/config/arm/linux-elf.h4
3 files changed, 13 insertions, 5 deletions
diff --git a/gcc/config/arm/aof.h b/gcc/config/arm/aof.h
index 2721b8bbdeb..55b8eefda2d 100644
--- a/gcc/config/arm/aof.h
+++ b/gcc/config/arm/aof.h
@@ -55,7 +55,7 @@ Boston, MA 02111-1307, USA. */
char *aof_text_section ();
#define TEXT_SECTION_ASM_OP aof_text_section ()
-#define SELECT_RTX_SECTION(MODE,RTX) text_section ();
+#define SELECT_RTX_SECTION(MODE,RTX,ALIGN) text_section ();
char *aof_data_section ();
#define DATA_SECTION_ASM_OP aof_data_section ()
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index c3f4e2eadef..725864c54a0 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -10860,6 +10860,10 @@ arm_elf_asm_named_section (name, flags)
*f++ = 'x';
if (flags & SECTION_SMALL)
*f++ = 's';
+ if (flags & SECTION_MERGE)
+ *f++ = 'M';
+ if (flags & SECTION_STRINGS)
+ *f++ = 'S';
*f = '\0';
if (flags & SECTION_BSS)
@@ -10867,6 +10871,10 @@ arm_elf_asm_named_section (name, flags)
else
type = "progbits";
- fprintf (asm_out_file, "\t.section\t%s,\"%s\",%%%s\n",
- name, flagchars, type);
+ if (flags & SECTION_ENTSIZE)
+ fprintf (asm_out_file, "\t.section\t%s,\"%s\",%%%s,%d\n",
+ name, flagchars, type, flags & SECTION_ENTSIZE);
+ else
+ fprintf (asm_out_file, "\t.section\t%s,\"%s\",%%%s\n",
+ name, flagchars, type);
}
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index 06519604ff0..cb9014ce741 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -139,7 +139,7 @@ const_section () \
section for output of DECL. DECL is either a `VAR_DECL' node
or a constant of some sort. RELOC indicates whether forming
the initial value of DECL requires link-time relocations. */
-#define SELECT_SECTION(DECL,RELOC) \
+#define SELECT_SECTION(DECL,RELOC,ALIGN) \
{ \
if (TREE_CODE (DECL) == STRING_CST) \
{ \
@@ -204,7 +204,7 @@ const_section () \
of constant in RTL. The argument MODE is redundant except
in the case of a `const_int' rtx. Currently, these always
go into the const section. */
-#define SELECT_RTX_SECTION(MODE,RTX) const_section ()
+#define SELECT_RTX_SECTION(MODE,RTX,ALIGN) const_section ()
/* On svr4, we *do* have support for the .init and .fini sections, and we
can put stuff in there to be executed before and after `main'. We let