PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
/* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g.
- R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO
- in that slot. */
+ R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO
+ in that slot. */
static reloc_howto_type elf32_arm_howto_table[] =
{
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* BLX instruction for the Thumb. */
HOWTO (R_ARM_THM_XPC22, /* type */
2, /* rightshift */
0x07ff07ff, /* src_mask */
0x07ff07ff, /* dst_mask */
true), /* pcrel_offset */
-
+
/* These next three relocs are not defined, but we need to fill the space. */
HOWTO (R_ARM_NONE, /* type */
false), /* pcrel_offset */
/* Relocs used in ARM Linux */
-
+
HOWTO (R_ARM_COPY, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
HOWTO (R_ARM_JUMP_SLOT, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
HOWTO (R_ARM_RELATIVE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
HOWTO (R_ARM_GOTOFF, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
HOWTO (R_ARM_GOTPC, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true), /* pcrel_offset */
-
+
HOWTO (R_ARM_GOT32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
-
+
HOWTO (R_ARM_PLT32, /* type */
2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
true), /* pcrel_offset */
-
- /* End of relocs used in ARM Linux */
+
+ /* End of relocs used in ARM Linux */
HOWTO (R_ARM_RREL32, /* type */
0, /* rightshift */
0x000000ff, /* dst_mask */
true); /* pcrel_offset */
-
static void
elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
bfd * abfd ATTRIBUTE_UNUSED;
Elf32_Internal_Rel * elf_reloc;
{
unsigned int r_type;
-
+
r_type = ELF32_R_TYPE (elf_reloc->r_info);
switch (r_type)
case R_ARM_GNU_VTINHERIT:
bfd_reloc->howto = & elf32_arm_vtinherit_howto;
break;
-
+
case R_ARM_GNU_VTENTRY:
bfd_reloc->howto = & elf32_arm_vtentry_howto;
break;
-
+
case R_ARM_THM_PC11:
bfd_reloc->howto = & elf32_arm_thm_pc11_howto;
break;
-
+
case R_ARM_THM_PC9:
bfd_reloc->howto = & elf32_arm_thm_pc9_howto;
break;
-
+
default:
if (r_type >= NUM_ELEM (elf32_arm_howto_table))
bfd_reloc->howto = NULL;
break;
}
}
-
+
struct elf32_arm_reloc_map
{
bfd_reloc_code_real_type bfd_reloc_val;
for (i = 0; i < NUM_ELEM (elf32_arm_reloc_map); i ++)
if (elf32_arm_reloc_map[i].bfd_reloc_val == code)
return & elf32_arm_howto_table[elf32_arm_reloc_map[i].elf_reloc_val];
-
+
return NULL;
}
}