#include "rtl-iter.h"
#include "print-rtl.h"
#include "function-abi.h"
+#include "common/common-target.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h" /* Needed for external data declarations. */
fputc ('\n', asm_out_file);
}
+/* Judge if an absolute jump table is relocatable. */
+
+bool
+jumptable_relocatable (void)
+{
+ bool relocatable = false;
+
+ if (!CASE_VECTOR_PC_RELATIVE
+ && !targetm.asm_out.generate_pic_addr_diff_vec ()
+ && targetm_common.have_named_sections)
+ relocatable = targetm.asm_out.reloc_rw_mask ();
+
+ return relocatable;
+}
+
/* The final scan for one insn, INSN.
Args are same as in `final', except that INSN
is the insn being scanned.
int log_align;
switch_to_section (targetm.asm_out.function_rodata_section
- (current_function_decl));
+ (current_function_decl,
+ jumptable_relocatable ()));
#ifdef ADDR_VEC_ALIGN
log_align = ADDR_VEC_ALIGN (table);
if (! JUMP_TABLES_IN_TEXT_SECTION)
switch_to_section (targetm.asm_out.function_rodata_section
- (current_function_decl));
+ (current_function_decl,
+ jumptable_relocatable ()));
else
switch_to_section (current_function_section ());