From 6ca86a1a1e15bb16d112991c130acee8e13686ab Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 25 Jan 2003 11:08:15 -0800 Subject: [PATCH] ia64.c (ia64_rwreloc_select_rtx_section): Rename from ia64_aix_select_rtx_section. * 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. From-SVN: r61797 --- gcc/ChangeLog | 12 ++++++++++++ gcc/config/ia64/aix.h | 8 +++++--- gcc/config/ia64/hpux.h | 9 +++++++++ gcc/config/ia64/ia64.c | 28 +++++++++++----------------- 4 files changed, 37 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9568908a4db..b10a807ea49 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2003-01-25 Richard Henderson + + * 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 * config/h8300/h8300.c (h8300_shift_needs_scratch_p): Update a diff --git a/gcc/config/ia64/aix.h b/gcc/config/ia64/aix.h index c9dca9c4f12..5eb2334cb6a 100644 --- a/gcc/config/ia64/aix.h +++ b/gcc/config/ia64/aix.h @@ -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 diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h index d11d8ecf7b9..23000995068 100644 --- a/gcc/config/ia64/hpux.h +++ b/gcc/config/ia64/hpux.h @@ -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 diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 039d11aaac7..784bc394cd3 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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; -- 2.30.2