summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-12 18:15:51 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-12 18:15:51 +0000
commitcc2af1837d7bca898fa95e8eaa28d13b48c6e6fa (patch)
treed5e04a20439030e2a6ba4e1a6ad0511dafe290c3 /gcc
parent0b769e4a19bac098c1e2e648cec4e8d563bc3325 (diff)
downloadgcc-cc2af1837d7bca898fa95e8eaa28d13b48c6e6fa.tar.gz
* config/alpha/alpha.c (alpha_elf_section_type_flags): New.
(TARGET_SECTION_TYPE_FLAGS): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122850 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/alpha/alpha.c18
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 94c7bdf892c..0ce27464f37 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2007-03-12 Richard Henderson <rth@redhat.com>
+ * config/alpha/alpha.c (alpha_elf_section_type_flags): New.
+ (TARGET_SECTION_TYPE_FLAGS): New.
+
+2007-03-12 Richard Henderson <rth@redhat.com>
+
* config/darwin.c (machopic_reloc_rw_mask): New.
* config/darwin-protos.h (machopic_reloc_rw_mask): Declare.
* config/darwin.h (TARGET_ASM_RELOC_RW_MASK): New.
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index e6ea03f1b49..817aa479479 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -9343,6 +9343,22 @@ alpha_elf_select_rtx_section (enum machine_mode mode, rtx x,
return default_elf_select_rtx_section (mode, x, align);
}
+static unsigned int
+alpha_elf_section_type_flags (tree decl, const char *name, int reloc)
+{
+ unsigned int flags = 0;
+
+ if (strcmp (name, ".sdata") == 0
+ || strncmp (name, ".sdata.", 7) == 0
+ || strncmp (name, ".gnu.linkonce.s.", 16) == 0
+ || strcmp (name, ".sbss") == 0
+ || strncmp (name, ".sbss.", 6) == 0
+ || strncmp (name, ".gnu.linkonce.sb.", 17) == 0)
+ flags = SECTION_SMALL;
+
+ flags |= default_section_type_flags (decl, name, reloc);
+ return flags;
+}
#endif /* OBJECT_FORMAT_ELF */
/* Structure to collect function names for final output in link section. */
@@ -10580,6 +10596,8 @@ alpha_init_libfuncs (void)
#define TARGET_ASM_RELOC_RW_MASK alpha_elf_reloc_rw_mask
#undef TARGET_ASM_SELECT_RTX_SECTION
#define TARGET_ASM_SELECT_RTX_SECTION alpha_elf_select_rtx_section
+#undef TARGET_SECTION_TYPE_FLAGS
+#define TARGET_SECTION_TYPE_FLAGS alpha_elf_section_type_flags
#endif
#undef TARGET_ASM_FUNCTION_END_PROLOGUE