#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
{ BFD_RELOC_##TYPE, R_##TYPE },
+/* Aliases. */
+#define BFD_RELOC_ARC_NONE BFD_RELOC_NONE
+#define BFD_RELOC_ARC_8 BFD_RELOC_8
+#define BFD_RELOC_ARC_16 BFD_RELOC_16
+#define BFD_RELOC_ARC_24 BFD_RELOC_24
+#define BFD_RELOC_ARC_32 BFD_RELOC_32
+#define BFD_RELOC_ARC_PC32 BFD_RELOC_32_PCREL
+#define BFD_RELOC_ARC_PLT32 BFD_RELOC_32_PLT_PCREL
+
static const struct arc_reloc_map arc_reloc_map[] =
{
#include "elf/arc-reloc.def"
-
- {BFD_RELOC_NONE, R_ARC_NONE},
- {BFD_RELOC_8, R_ARC_8},
- {BFD_RELOC_16, R_ARC_16},
- {BFD_RELOC_24, R_ARC_24},
- {BFD_RELOC_32, R_ARC_32},
};
#undef ARC_RELOC_HOWTO
{
DEF (gotoff, BFD_RELOC_ARC_GOTOFF, 1),
DEF (gotpc, BFD_RELOC_ARC_GOTPC32, 0),
- DEF (plt, BFD_RELOC_ARC_PLT32, 0),
+ DEF (plt, BFD_RELOC_32_PLT_PCREL, 0),
DEF (sda, DUMMY_RELOC_ARC_ENTRY, 1),
- DEF (pcl, BFD_RELOC_ARC_PC32, 1),
+ DEF (pcl, BFD_RELOC_32_PCREL, 1),
DEF (tlsgd, BFD_RELOC_ARC_TLS_GD_GOT, 0),
DEF (tlsie, BFD_RELOC_ARC_TLS_IE_GOT, 0),
DEF (tpoff9, BFD_RELOC_ARC_TLS_LE_S9, 0),
}
/* Return true if a RELOC is generic. A generic reloc is PC-rel of a
- simple ME relocation (e.g. RELOC_ARC_32_ME, BFD_RELOC_ARC_PC32. */
+ simple ME relocation (e.g. RELOC_ARC_32_ME, BFD_RELOC_32_PCREL. */
static bool
generic_reloc_p (extended_bfd_reloc_code_real_type reloc)
{
switch (fixP->fx_r_type)
{
- case BFD_RELOC_ARC_PC32:
+ case BFD_RELOC_32_PCREL:
/* The hardware calculates relative to the start of the
insn, but this relocation is relative to location of the
LIMM, compensate. The base always needs to be
relocation for short instructions. */
base -= 4;
/* Fall through. */
- case BFD_RELOC_ARC_PLT32:
+ case BFD_RELOC_32_PLT_PCREL:
case BFD_RELOC_ARC_S25H_PCREL_PLT:
case BFD_RELOC_ARC_S21H_PCREL_PLT:
case BFD_RELOC_ARC_S25W_PCREL_PLT:
fixP->fx_offset += fixP->fx_frag->fr_address;
/* Fall through. */
case BFD_RELOC_32:
- fixP->fx_r_type = BFD_RELOC_ARC_PC32;
+ fixP->fx_r_type = BFD_RELOC_32_PCREL;
/* Fall through. */
- case BFD_RELOC_ARC_PC32:
+ case BFD_RELOC_32_PCREL:
/* fixP->fx_offset += fixP->fx_where - fixP->fx_dot_value; */
break;
default:
case BFD_RELOC_ARC_GOTOFF:
case BFD_RELOC_ARC_32_ME:
- case BFD_RELOC_ARC_PC32:
+ case BFD_RELOC_32_PCREL:
md_number_to_chars_midend (fixpos, value, fixP->fx_size);
return;
- case BFD_RELOC_ARC_PLT32:
+ case BFD_RELOC_32_PLT_PCREL:
md_number_to_chars_midend (fixpos, value, fixP->fx_size);
return;
switch (fixP->fx_r_type)
{
case BFD_RELOC_ARC_GOTPC32:
- case BFD_RELOC_ARC_PLT32:
+ case BFD_RELOC_32_PLT_PCREL:
case BFD_RELOC_ARC_S25H_PCREL_PLT:
case BFD_RELOC_ARC_S21H_PCREL_PLT:
case BFD_RELOC_ARC_S25W_PCREL_PLT: