Wed Nov 26 15:47:30 1997 Michael Meissner <meissner@cygnus.com>
+ * rs6000.c (SMALL_DATA_REG): Register to use for small data relocs.
+ (print_operand): Use SMALL_DATA_REG for the register involved in
+ small data relocations.
+ (print_operand_address): Ditto.
+
+ * rs6000/linux.h (LINK_SPEC): Pass -dynamic-linker /lib/ld.so.1 if
+ -dynamic linker is not used.
+
* rs6000.md (call insns): For local calls, use @local suffix under
System V. Don't use @plt under Solaris.
#if TARGET_ELF
#define SMALL_DATA_RELOC ((rs6000_sdata == SDATA_EABI) ? "sda21" : "sdarel")
+#define SMALL_DATA_REG ((rs6000_sdata == SDATA_EABI) ? 0 : 13)
#else
#define SMALL_DATA_RELOC "sda21"
+#define SMALL_DATA_REG 0
#endif
void
else
output_address (plus_constant (XEXP (x, 0), 4));
if (small_data_operand (x, GET_MODE (x)))
- fprintf (file, "@%s(%s)", SMALL_DATA_RELOC, reg_names[0]);
+ fprintf (file, "@%s(%s)", SMALL_DATA_RELOC,
+ reg_names[SMALL_DATA_REG]);
}
return;
else
output_address (plus_constant (XEXP (x, 0), 8));
if (small_data_operand (x, GET_MODE (x)))
- fprintf (file, "@%s(%s)", SMALL_DATA_RELOC, reg_names[0]);
+ fprintf (file, "@%s(%s)", SMALL_DATA_RELOC,
+ reg_names[SMALL_DATA_REG]);
}
return;
else
output_address (plus_constant (XEXP (x, 0), 12));
if (small_data_operand (x, GET_MODE (x)))
- fprintf (file, "@%s(%s)", SMALL_DATA_RELOC, reg_names[0]);
+ fprintf (file, "@%s(%s)", SMALL_DATA_RELOC,
+ reg_names[SMALL_DATA_REG]);
}
return;
{
output_addr_const (file, x);
if (small_data_operand (x, GET_MODE (x)))
- fprintf (file, "@%s(%s)", SMALL_DATA_RELOC, reg_names[0]);
+ fprintf (file, "@%s(%s)", SMALL_DATA_RELOC,
+ reg_names[SMALL_DATA_REG]);
#ifdef TARGET_NO_TOC
else if (TARGET_NO_TOC)