* elf32-arm.h (elf32_arm_reloc_map): Removed.
(elf32_arm_reloc_type_lookup): Removed * elfarm-nabi.c (elf32_arm_reloc_map): New. (elf32_arm_reloc_type_lookup): New. * elfarm-oabi.c (elf32_arm_reloc_map): New. (elf32_arm_reloc_type_lookup): New.
This commit is contained in:
parent
f4355fa583
commit
5ce0edb79e
@ -1,3 +1,12 @@
|
||||
Tue Feb 2 18:16:43 1999 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* elf32-arm.h (elf32_arm_reloc_map): Removed.
|
||||
(elf32_arm_reloc_type_lookup): Removed
|
||||
* elfarm-nabi.c (elf32_arm_reloc_map): New.
|
||||
(elf32_arm_reloc_type_lookup): New.
|
||||
* elfarm-oabi.c (elf32_arm_reloc_map): New.
|
||||
(elf32_arm_reloc_type_lookup): New.
|
||||
|
||||
Mon Feb 1 19:49:21 1999 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* elfarm-nabi.c: Renamed from elf32-arm-newabi.c.
|
||||
|
@ -21,8 +21,6 @@
|
||||
typedef unsigned long int insn32;
|
||||
typedef unsigned short int insn16;
|
||||
|
||||
static reloc_howto_type *elf32_arm_reloc_type_lookup
|
||||
PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
|
||||
static void elf32_arm_info_to_howto
|
||||
PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
|
||||
static boolean elf32_arm_set_private_flags
|
||||
@ -622,49 +620,6 @@ error_return:
|
||||
|
||||
}
|
||||
|
||||
struct elf32_arm_reloc_map
|
||||
{
|
||||
unsigned char bfd_reloc_val;
|
||||
unsigned char elf_reloc_val;
|
||||
};
|
||||
|
||||
static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
|
||||
{
|
||||
{BFD_RELOC_NONE, R_ARM_NONE,},
|
||||
{BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24,},
|
||||
{BFD_RELOC_32, R_ARM_ABS32,},
|
||||
{BFD_RELOC_32_PCREL, R_ARM_REL32,},
|
||||
{BFD_RELOC_8, R_ARM_ABS8,},
|
||||
{BFD_RELOC_16, R_ARM_ABS16,},
|
||||
{BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12,},
|
||||
{BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22,},
|
||||
{BFD_RELOC_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT },
|
||||
{BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY },
|
||||
{BFD_RELOC_NONE, R_ARM_SBREL32,},
|
||||
{BFD_RELOC_NONE, R_ARM_AMP_VCALL9,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_PC11,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_PC9,}
|
||||
};
|
||||
|
||||
static reloc_howto_type *
|
||||
elf32_arm_reloc_type_lookup (abfd, code)
|
||||
bfd *abfd;
|
||||
bfd_reloc_code_real_type code;
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0;
|
||||
i < sizeof (elf32_arm_reloc_map) / sizeof (struct 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;
|
||||
}
|
||||
|
||||
/* The thumb form of a long branch is a bit finicky, because the offset
|
||||
encoding is split over two fields, each in it's own instruction. They
|
||||
can occur in any order. So given a thumb form of long branch, and an
|
||||
|
@ -33,6 +33,9 @@
|
||||
#define elf_info_to_howto_rel elf32_arm_info_to_howto_rel
|
||||
|
||||
|
||||
static reloc_howto_type *elf32_arm_reloc_type_lookup
|
||||
PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
|
||||
|
||||
static reloc_howto_type elf32_arm_howto_table[] =
|
||||
{
|
||||
/* No relocation */
|
||||
@ -395,4 +398,64 @@ elf32_arm_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
|
||||
else
|
||||
bfd_reloc->howto = &elf32_arm_howto_table[r_type];
|
||||
}
|
||||
|
||||
struct elf32_arm_reloc_map
|
||||
{
|
||||
unsigned char bfd_reloc_val;
|
||||
unsigned char elf_reloc_val;
|
||||
};
|
||||
|
||||
static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
|
||||
{
|
||||
{BFD_RELOC_NONE, R_ARM_NONE,},
|
||||
{BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24,},
|
||||
{BFD_RELOC_32, R_ARM_ABS32,},
|
||||
{BFD_RELOC_32_PCREL, R_ARM_REL32,},
|
||||
{BFD_RELOC_8, R_ARM_ABS8,},
|
||||
{BFD_RELOC_16, R_ARM_ABS16,},
|
||||
{BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12,},
|
||||
{BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22,},
|
||||
{BFD_RELOC_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT },
|
||||
{BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY },
|
||||
{BFD_RELOC_NONE, R_ARM_SBREL32,},
|
||||
{BFD_RELOC_NONE, R_ARM_AMP_VCALL9,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_PC11,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_PC9,}
|
||||
};
|
||||
|
||||
static reloc_howto_type *
|
||||
elf32_arm_reloc_type_lookup (abfd, code)
|
||||
bfd *abfd;
|
||||
bfd_reloc_code_real_type code;
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case BFD_RELOC_VTABLE_INHERIT:
|
||||
return &elf32_arm_vtinherit_howto;
|
||||
|
||||
case BFD_RELOC_VTABLE_ENTRY:
|
||||
return &elf32_arm_vtentry_howto;
|
||||
|
||||
case BFD_RELOC_THUMB_PCREL_BRANCH12:
|
||||
return &elf32_arm_thm_pc11_howto;
|
||||
|
||||
case BFD_RELOC_THUMB_PCREL_BRANCH9:
|
||||
return &elf32_arm_thm_pc9_howto;
|
||||
|
||||
default:
|
||||
for (i = 0;
|
||||
i < sizeof (elf32_arm_reloc_map) / sizeof (struct 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;
|
||||
}
|
||||
|
||||
#include "elf32-arm.h"
|
||||
|
@ -326,4 +326,47 @@ elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
|
||||
/* BFD_ASSERT (r_type < (unsigned int) R_ELF32_ARM_MAX); */
|
||||
bfd_reloc->howto = &elf32_arm_howto_table[r_type];
|
||||
}
|
||||
|
||||
struct elf32_arm_reloc_map
|
||||
{
|
||||
unsigned char bfd_reloc_val;
|
||||
unsigned char elf_reloc_val;
|
||||
};
|
||||
|
||||
static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
|
||||
{
|
||||
{BFD_RELOC_NONE, R_ARM_NONE,},
|
||||
{BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24,},
|
||||
{BFD_RELOC_32, R_ARM_ABS32,},
|
||||
{BFD_RELOC_32_PCREL, R_ARM_REL32,},
|
||||
{BFD_RELOC_8, R_ARM_ABS8,},
|
||||
{BFD_RELOC_16, R_ARM_ABS16,},
|
||||
{BFD_RELOC_ARM_OFFSET_IMM, R_ARM_ABS12,},
|
||||
{BFD_RELOC_ARM_THUMB_OFFSET, R_ARM_THM_ABS5,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH23, R_ARM_THM_PC22,},
|
||||
{BFD_RELOC_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT },
|
||||
{BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY },
|
||||
{BFD_RELOC_NONE, R_ARM_SBREL32,},
|
||||
{BFD_RELOC_NONE, R_ARM_AMP_VCALL9,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_PC11,},
|
||||
{BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_PC9,}
|
||||
};
|
||||
|
||||
static reloc_howto_type *
|
||||
elf32_arm_reloc_type_lookup (abfd, code)
|
||||
bfd *abfd;
|
||||
bfd_reloc_code_real_type code;
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0;
|
||||
i < sizeof (elf32_arm_reloc_map) / sizeof (struct 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;
|
||||
}
|
||||
#include "elf32-arm.h"
|
||||
|
Loading…
Reference in New Issue
Block a user