* config/ia64/ia64.c (ia64_rwreloc_select_rtx_section): Rename
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jan 2003 19:08:15 +0000 (19:08 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jan 2003 19:08:15 +0000 (19:08 +0000)
        from ia64_aix_select_rtx_section.
        (ia64_rwreloc_select_section): Simlarly; use default*_1 function
        instead of saving and restoring flag_pic.
        (ia64_rwreloc_unique_section): Similarly.
        * config/ia64/aix.h (TARGET_ASM_SELECT_SECTION,
        TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Update.
        * config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION,
        TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61797 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/ia64/aix.h
gcc/config/ia64/hpux.h
gcc/config/ia64/ia64.c

index 9568908..b10a807 100644 (file)
@@ -1,3 +1,15 @@
+2003-01-25  Richard Henderson  <rth@redhat.com>
+
+       * config/ia64/ia64.c (ia64_rwreloc_select_rtx_section): Rename
+       from ia64_aix_select_rtx_section.
+       (ia64_rwreloc_select_section): Simlarly; use default*_1 function
+       instead of saving and restoring flag_pic.
+       (ia64_rwreloc_unique_section): Similarly.
+       * config/ia64/aix.h (TARGET_ASM_SELECT_SECTION,
+       TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Update.
+       * config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION,
+       TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): New.
+
 2003-01-25  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (h8300_shift_needs_scratch_p): Update a
index c9dca9c..5eb2334 100644 (file)
@@ -134,12 +134,14 @@ do {                                                      \
 #define STANDARD_STARTFILE_PREFIX "/usr/lib/ia64l64/"
 #endif
 
+/* It is illegal to have relocations in shared segments on AIX.
+   Pretend flag_pic is always set.  */
 #undef TARGET_ASM_SELECT_SECTION
-#define TARGET_ASM_SELECT_SECTION  ia64_aix_select_section
+#define TARGET_ASM_SELECT_SECTION  ia64_rwreloc_select_section
 #undef TARGET_ASM_UNIQUE_SECTION
-#define TARGET_ASM_UNIQUE_SECTION  ia64_aix_unique_section
+#define TARGET_ASM_UNIQUE_SECTION  ia64_rwreloc_unique_section
 #undef TARGET_ASM_SELECT_RTX_SECTION
-#define TARGET_ASM_SELECT_RTX_SECTION  ia64_aix_select_rtx_section
+#define TARGET_ASM_SELECT_RTX_SECTION  ia64_rwreloc_select_rtx_section
 
 /* Override ia64/sysv4.h setting with that used by AIX5.  */
 #undef WCHAR_TYPE
index d11d8ec..2300099 100644 (file)
@@ -167,3 +167,12 @@ do {                                                               \
 
 #undef TEXT_SECTION_ASM_OP
 #define TEXT_SECTION_ASM_OP "\t.section\t.text,\t\"ax\",\t\"progbits\""
+
+/* It is illegal to have relocations in shared segments on HPUX.
+   Pretend flag_pic is always set.  */
+#undef  TARGET_ASM_SELECT_SECTION
+#define TARGET_ASM_SELECT_SECTION  ia64_rwreloc_select_section
+#undef  TARGET_ASM_UNIQUE_SECTION
+#define TARGET_ASM_UNIQUE_SECTION  ia64_rwreloc_unique_section
+#undef  TARGET_ASM_SELECT_RTX_SECTION
+#define TARGET_ASM_SELECT_RTX_SECTION  ia64_rwreloc_select_rtx_section
index 039d11a..784bc39 100644 (file)
@@ -207,13 +207,13 @@ static void ia64_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
 
 static void ia64_select_rtx_section PARAMS ((enum machine_mode, rtx,
                                             unsigned HOST_WIDE_INT));
-static void ia64_aix_select_section PARAMS ((tree, int,
-                                            unsigned HOST_WIDE_INT))
+static void ia64_rwreloc_select_section PARAMS ((tree, int,
+                                                unsigned HOST_WIDE_INT))
      ATTRIBUTE_UNUSED;
-static void ia64_aix_unique_section PARAMS ((tree, int))
+static void ia64_rwreloc_unique_section PARAMS ((tree, int))
      ATTRIBUTE_UNUSED;
-static void ia64_aix_select_rtx_section PARAMS ((enum machine_mode, rtx,
-                                                unsigned HOST_WIDE_INT))
+static void ia64_rwreloc_select_rtx_section PARAMS ((enum machine_mode, rtx,
+                                                    unsigned HOST_WIDE_INT))
      ATTRIBUTE_UNUSED;
 
 static void ia64_hpux_add_extern_decl PARAMS ((const char *name))
@@ -8273,34 +8273,28 @@ ia64_select_rtx_section (mode, x, align)
     default_elf_select_rtx_section (mode, x, align);
 }
 
-/* It is illegal to have relocations in shared segments on AIX.
+/* It is illegal to have relocations in shared segments on AIX and HPUX.
    Pretend flag_pic is always set.  */
 
 static void
-ia64_aix_select_section (exp, reloc, align)
+ia64_rwreloc_select_section (exp, reloc, align)
      tree exp;
      int reloc;
      unsigned HOST_WIDE_INT align;
 {
-  int save_pic = flag_pic;
-  flag_pic = 1;
-  default_elf_select_section (exp, reloc, align);
-  flag_pic = save_pic;
+  default_elf_select_section_1 (exp, reloc, align, true);
 }
 
 static void
-ia64_aix_unique_section (decl, reloc)
+ia64_rwreloc_unique_section (decl, reloc)
      tree decl;
      int reloc;
 {
-  int save_pic = flag_pic;
-  flag_pic = 1;
-  default_unique_section (decl, reloc);
-  flag_pic = save_pic;
+  default_unique_section_1 (decl, reloc, true);
 }
 
 static void
-ia64_aix_select_rtx_section (mode, x, align)
+ia64_rwreloc_select_rtx_section (mode, x, align)
      enum machine_mode mode;
      rtx x;
      unsigned HOST_WIDE_INT align;