]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alpha.c (alpha_elf_section_type_flags): New.
authorRichard Henderson <rth@redhat.com>
Mon, 12 Mar 2007 18:15:51 +0000 (11:15 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 12 Mar 2007 18:15:51 +0000 (11:15 -0700)
        * config/alpha/alpha.c (alpha_elf_section_type_flags): New.
(TARGET_SECTION_TYPE_FLAGS): New.

From-SVN: r122850

gcc/ChangeLog
gcc/config/alpha/alpha.c

index 94c7bdf892c6bfadaf2abb79647420ff9c5613bf..0ce27464f37ce6ab554863a5fcb0d873bc322893 100644 (file)
@@ -1,3 +1,8 @@
+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.
index e6ea03f1b494f7e42eba196674ade3d4d5b5f259..817aa47947946001694e616434c77d8063a155e4 100644 (file)
@@ -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 */
 \f
 /* 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