On Mon, Mar 12, 2007 at 08:32:43AM -0400, Jack Howarth wrote: > - else if (decl_readonly_section_1 (exp, reloc, MACHOPIC_INDIRECT)) > + else if (decl_readonly_section (exp, reloc))
Not just that. Try this. * config/darwin.c (machopic_reloc_rw_mask): New. (machopic_select_section): Use decl_readonly_section. * config/darwin-protos.h (machopic_reloc_rw_mask): Declare. * config/darwin.h (TARGET_ASM_RELOC_RW_MASK): New. --- config/darwin-protos.h (revision 122852) +++ config/darwin-protos.h (local) @@ -52,6 +52,7 @@ extern void darwin_set_default_type_attr extern void machopic_finish (FILE *); +extern int machopic_reloc_rw_mask (void); extern section *machopic_select_section (tree, int, unsigned HOST_WIDE_INT); extern section *machopic_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT); --- config/darwin.c (revision 122852) +++ config/darwin.c (local) @@ -1093,6 +1093,12 @@ darwin_mark_decl_preserved (const char * fputc ('\n', asm_out_file); } +int +machopic_reloc_rw_mask (void) +{ + return MACHOPIC_INDIRECT ? 3 : 0; +} + section * machopic_select_section (tree exp, int reloc, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) @@ -1112,7 +1118,7 @@ machopic_select_section (tree exp, int r else base_section = weak_p ? darwin_sections[text_coal_section] : text_section; } - else if (decl_readonly_section_1 (exp, reloc, MACHOPIC_INDIRECT)) + else if (decl_readonly_section (exp, reloc)) base_section = weak_p ? darwin_sections[const_coal_section] : darwin_sections[const_section]; else if (TREE_READONLY (exp) || TREE_CONSTANT (exp)) base_section = weak_p ? darwin_sections[const_data_coal_section] : darwin_sections[const_data_section]; --- config/darwin.h (revision 122852) +++ config/darwin.h (local) @@ -679,6 +679,8 @@ extern GTY(()) section * darwin_sections #define TARGET_ASM_UNIQUE_SECTION darwin_unique_section #undef TARGET_ASM_FUNCTION_RODATA_SECTION #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section +#undef TARGET_ASM_RELOC_RW_MASK +#define TARGET_ASM_RELOC_RW_MASK machopic_reloc_rw_mask #define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \