/* These are the only relocation types we care about. */
if ( r_type != R_ARM_PC24
+#ifndef OLD_ARM_ABI
+ && r_type != R_ARM_CALL
+ && r_type != R_ARM_JUMP24
+#endif
&& r_type != R_ARM_THM_PC22)
continue;
switch (r_type)
{
case R_ARM_PC24:
+#ifndef OLD_ARM_ABI
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
+#endif
/* This one is a call from arm code. We need to look up
the target of the call. If it is a thumb target, we
insert glue. */
case R_ARM_ABS32:
case R_ARM_REL32:
#ifndef OLD_ARM_ABI
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
case R_ARM_XPC25:
case R_ARM_PREL31:
#endif
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& r_type != R_ARM_PC24
+#ifndef OLD_ARM_ABI
+ && r_type != R_ARM_CALL
+ && r_type != R_ARM_JUMP24
+#endif
&& r_type != R_ARM_PLT32)
{
Elf_Internal_Rela outrel;
{
#ifndef OLD_ARM_ABI
case R_ARM_XPC25: /* Arm BLX instruction. */
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
#endif
case R_ARM_PC24: /* Arm B/BL instruction */
case R_ARM_PLT32:
break;
case R_ARM_PC24:
+#ifndef OLD_ARM_ABI
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
+#endif
addend <<= howto->size;
addend += increment;
switch (r_type)
{
case R_ARM_PC24:
+#ifndef OLD_ARM_ABI
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
+#endif
case R_ARM_ABS32:
case R_ARM_THM_PC22:
case R_ARM_PLT32:
case R_ARM_PC24:
case R_ARM_PLT32:
#ifndef OLD_ARM_ABI
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
case R_ARM_PREL31:
#endif
r_symndx = ELF32_R_SYM (rel->r_info);
case R_ARM_PC24:
case R_ARM_PLT32:
#ifndef OLD_ARM_ABI
+ case R_ARM_CALL:
+ case R_ARM_JUMP24:
case R_ARM_PREL31:
#endif
if (h != NULL)
sure yet, because something later might force the
symbol local. */
if (r_type == R_ARM_PC24
+#ifndef OLD_ARM_ABI
+ || r_type == R_ARM_CALL
+ || r_type == R_ARM_JUMP24
+#endif
|| r_type == R_ARM_PLT32)
h->needs_plt = 1;
&& ((r_type != R_ARM_PC24
&& r_type != R_ARM_PLT32
#ifndef OLD_ARM_ABI
+ && r_type != R_ARM_CALL
+ && r_type != R_ARM_JUMP24
&& r_type != R_ARM_PREL31
#endif
&& r_type != R_ARM_REL32)
}
else
/* It's possible that we incorrectly decided a .plt reloc was
- needed for an R_ARM_PC24 reloc to a non-function sym in
- check_relocs. We can't decide accurately between function and
- non-function syms in check-relocs; Objects loaded later in
+ needed for an R_ARM_PC24 or similar reloc to a non-function sym
+ in check_relocs. We can't decide accurately between function
+ and non-function syms in check-relocs; Objects loaded later in
the link may change h->type. So fix it now. */
h->plt.offset = (bfd_vma) -1;
0x00ffffff, /* dst_mask */
TRUE), /* pcrel_offset */
- /* End of relocs used in ARM Linux */
-
- HOWTO (R_ARM_RREL32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
+ HOWTO (R_ARM_CALL, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
+ complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RREL32", /* name */
+ "R_ARM_CALL", /* name */
FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
- HOWTO (R_ARM_RABS32, /* type */
- 0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
- FALSE, /* pc_relative */
+ HOWTO (R_ARM_JUMP24, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont,/* complain_on_overflow */
+ complain_overflow_signed,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RABS32", /* name */
+ "R_ARM_JUMP24", /* name */
FALSE, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 0x00ffffff, /* src_mask */
+ 0x00ffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
- HOWTO (R_ARM_RPC24, /* type */
+ HOWTO (R_ARM_NONE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RPC24", /* name */
+ "R_ARM_unknown_30", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
- HOWTO (R_ARM_RBASE, /* type */
+ HOWTO (R_ARM_NONE, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
0, /* bitpos */
complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_ARM_RBASE", /* name */
+ "R_ARM_unknown_31", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
0xffffffff, /* dst_mask */
TRUE); /* pcrel_offset */
+/* Currently unused relocations. */
+static reloc_howto_type elf32_arm_r_howto[4] =
+{
+ HOWTO (R_ARM_RREL32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RREL32", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_RABS32, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RABS32", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_RPC24, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RPC24", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_ARM_RBASE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_RBASE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE) /* pcrel_offset */
+};
+
static reloc_howto_type *
elf32_arm_howto_from_type (unsigned int r_type)
{
case R_ARM_THM_PC9:
return &elf32_arm_thm_pc9_howto;
+ case R_ARM_RREL32:
+ case R_ARM_RABS32:
+ case R_ARM_RPC24:
+ case R_ARM_RBASE:
+ return &elf32_arm_r_howto[r_type - R_ARM_RREL32];
+
default:
return NULL;
}