Line 227... |
Line 227... |
0, /* bitpos */
|
0, /* bitpos */
|
complain_overflow_signed,/* complain_on_overflow */
|
complain_overflow_signed,/* complain_on_overflow */
|
bfd_elf_generic_reloc, /* special_function */
|
bfd_elf_generic_reloc, /* special_function */
|
"R_ARM_THM_CALL", /* name */
|
"R_ARM_THM_CALL", /* name */
|
FALSE, /* partial_inplace */
|
FALSE, /* partial_inplace */
|
0x07ff07ff, /* src_mask */
|
0x07ff2fff, /* src_mask */
|
0x07ff07ff, /* dst_mask */
|
0x07ff2fff, /* dst_mask */
|
TRUE), /* pcrel_offset */
|
TRUE), /* pcrel_offset */
|
|
|
HOWTO (R_ARM_THM_PC8, /* type */
|
HOWTO (R_ARM_THM_PC8, /* type */
|
1, /* rightshift */
|
1, /* rightshift */
|
1, /* size (0 = byte, 1 = short, 2 = long) */
|
1, /* size (0 = byte, 1 = short, 2 = long) */
|
Line 291... |
Line 291... |
|
|
/* BLX instruction for the ARM. */
|
/* BLX instruction for the ARM. */
|
HOWTO (R_ARM_XPC25, /* type */
|
HOWTO (R_ARM_XPC25, /* type */
|
2, /* rightshift */
|
2, /* rightshift */
|
2, /* size (0 = byte, 1 = short, 2 = long) */
|
2, /* size (0 = byte, 1 = short, 2 = long) */
|
25, /* bitsize */
|
24, /* bitsize */
|
TRUE, /* pc_relative */
|
TRUE, /* pc_relative */
|
0, /* bitpos */
|
0, /* bitpos */
|
complain_overflow_signed,/* complain_on_overflow */
|
complain_overflow_signed,/* complain_on_overflow */
|
bfd_elf_generic_reloc, /* special_function */
|
bfd_elf_generic_reloc, /* special_function */
|
"R_ARM_XPC25", /* name */
|
"R_ARM_XPC25", /* name */
|
Line 306... |
Line 306... |
|
|
/* BLX instruction for the Thumb. */
|
/* BLX instruction for the Thumb. */
|
HOWTO (R_ARM_THM_XPC22, /* type */
|
HOWTO (R_ARM_THM_XPC22, /* type */
|
2, /* rightshift */
|
2, /* rightshift */
|
2, /* size (0 = byte, 1 = short, 2 = long) */
|
2, /* size (0 = byte, 1 = short, 2 = long) */
|
22, /* bitsize */
|
24, /* bitsize */
|
TRUE, /* pc_relative */
|
TRUE, /* pc_relative */
|
0, /* bitpos */
|
0, /* bitpos */
|
complain_overflow_signed,/* complain_on_overflow */
|
complain_overflow_signed,/* complain_on_overflow */
|
bfd_elf_generic_reloc, /* special_function */
|
bfd_elf_generic_reloc, /* special_function */
|
"R_ARM_THM_XPC22", /* name */
|
"R_ARM_THM_XPC22", /* name */
|
FALSE, /* partial_inplace */
|
FALSE, /* partial_inplace */
|
0x07ff07ff, /* src_mask */
|
0x07ff2fff, /* src_mask */
|
0x07ff07ff, /* dst_mask */
|
0x07ff2fff, /* dst_mask */
|
TRUE), /* pcrel_offset */
|
TRUE), /* pcrel_offset */
|
|
|
/* Dynamic TLS relocations. */
|
/* Dynamic TLS relocations. */
|
|
|
HOWTO (R_ARM_TLS_DTPMOD32, /* type */
|
HOWTO (R_ARM_TLS_DTPMOD32, /* type */
|
Line 2774... |
Line 2774... |
int fix_v4bx;
|
int fix_v4bx;
|
|
|
/* Whether we should fix the Cortex-A8 Thumb-2 branch/TLB erratum. */
|
/* Whether we should fix the Cortex-A8 Thumb-2 branch/TLB erratum. */
|
int fix_cortex_a8;
|
int fix_cortex_a8;
|
|
|
|
/* Whether we should fix the ARM1176 BLX immediate issue. */
|
|
int fix_arm1176;
|
|
|
/* Nonzero if the ARM/Thumb BLX instructions are available for use. */
|
/* Nonzero if the ARM/Thumb BLX instructions are available for use. */
|
int use_blx;
|
int use_blx;
|
|
|
/* What sort of code sequences we should look for which may trigger the
|
/* What sort of code sequences we should look for which may trigger the
|
VFP11 denorm erratum. */
|
VFP11 denorm erratum. */
|
Line 3313... |
Line 3316... |
memset (ret->bx_glue_offset, 0, sizeof (ret->bx_glue_offset));
|
memset (ret->bx_glue_offset, 0, sizeof (ret->bx_glue_offset));
|
ret->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
|
ret->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
|
ret->vfp11_erratum_glue_size = 0;
|
ret->vfp11_erratum_glue_size = 0;
|
ret->num_vfp11_fixes = 0;
|
ret->num_vfp11_fixes = 0;
|
ret->fix_cortex_a8 = 0;
|
ret->fix_cortex_a8 = 0;
|
|
ret->fix_arm1176 = 0;
|
ret->bfd_of_glue_owner = NULL;
|
ret->bfd_of_glue_owner = NULL;
|
ret->byteswap_code = 0;
|
ret->byteswap_code = 0;
|
ret->target1_is_rel = 0;
|
ret->target1_is_rel = 0;
|
ret->target2_reloc = R_ARM_NONE;
|
ret->target2_reloc = R_ARM_NONE;
|
#ifdef FOUR_WORD_PLT
|
#ifdef FOUR_WORD_PLT
|
Line 5928... |
Line 5932... |
}
|
}
|
|
|
static void
|
static void
|
check_use_blx (struct elf32_arm_link_hash_table *globals)
|
check_use_blx (struct elf32_arm_link_hash_table *globals)
|
{
|
{
|
if (bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
|
int cpu_arch;
|
Tag_CPU_arch) > 2)
|
|
|
cpu_arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
|
|
Tag_CPU_arch);
|
|
|
|
if (globals->fix_arm1176)
|
|
{
|
|
if (cpu_arch == TAG_CPU_ARCH_V6T2 || cpu_arch > TAG_CPU_ARCH_V6K)
|
globals->use_blx = 1;
|
globals->use_blx = 1;
|
}
|
}
|
|
else
|
|
{
|
|
if (cpu_arch > TAG_CPU_ARCH_V4T)
|
|
globals->use_blx = 1;
|
|
}
|
|
}
|
|
|
bfd_boolean
|
bfd_boolean
|
bfd_elf32_arm_process_before_allocation (bfd *abfd,
|
bfd_elf32_arm_process_before_allocation (bfd *abfd,
|
struct bfd_link_info *link_info)
|
struct bfd_link_info *link_info)
|
{
|
{
|
Line 6784... |
Line 6800... |
char * target2_type,
|
char * target2_type,
|
int fix_v4bx,
|
int fix_v4bx,
|
int use_blx,
|
int use_blx,
|
bfd_arm_vfp11_fix vfp11_fix,
|
bfd_arm_vfp11_fix vfp11_fix,
|
int no_enum_warn, int no_wchar_warn,
|
int no_enum_warn, int no_wchar_warn,
|
int pic_veneer, int fix_cortex_a8)
|
int pic_veneer, int fix_cortex_a8,
|
|
int fix_arm1176)
|
{
|
{
|
struct elf32_arm_link_hash_table *globals;
|
struct elf32_arm_link_hash_table *globals;
|
|
|
globals = elf32_arm_hash_table (link_info);
|
globals = elf32_arm_hash_table (link_info);
|
if (globals == NULL)
|
if (globals == NULL)
|
Line 6809... |
Line 6826... |
globals->fix_v4bx = fix_v4bx;
|
globals->fix_v4bx = fix_v4bx;
|
globals->use_blx |= use_blx;
|
globals->use_blx |= use_blx;
|
globals->vfp11_fix = vfp11_fix;
|
globals->vfp11_fix = vfp11_fix;
|
globals->pic_veneer = pic_veneer;
|
globals->pic_veneer = pic_veneer;
|
globals->fix_cortex_a8 = fix_cortex_a8;
|
globals->fix_cortex_a8 = fix_cortex_a8;
|
|
globals->fix_arm1176 = fix_arm1176;
|
|
|
BFD_ASSERT (is_arm_elf (output_bfd));
|
BFD_ASSERT (is_arm_elf (output_bfd));
|
elf_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
|
elf_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
|
elf_arm_tdata (output_bfd)->no_wchar_size_warning = no_wchar_warn;
|
elf_arm_tdata (output_bfd)->no_wchar_size_warning = no_wchar_warn;
|
}
|
}
|
Line 9452... |
Line 9470... |
contents, rel->r_offset, value,
|
contents, rel->r_offset, value,
|
rel->r_addend);
|
rel->r_addend);
|
}
|
}
|
|
|
case R_ARM_TLS_LE32:
|
case R_ARM_TLS_LE32:
|
if (info->shared)
|
if (info->shared && !info->pie)
|
{
|
{
|
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
(_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"),
|
(_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"),
|
input_bfd, input_section,
|
input_bfd, input_section,
|
(long) rel->r_offset, howto->name);
|
(long) rel->r_offset, howto->name);
|
Line 12465... |
Line 12483... |
{
|
{
|
bfd *sub;
|
bfd *sub;
|
Elf_Internal_Shdr **elf_shdrp;
|
Elf_Internal_Shdr **elf_shdrp;
|
bfd_boolean again;
|
bfd_boolean again;
|
|
|
|
_bfd_elf_gc_mark_extra_sections (info, gc_mark_hook);
|
|
|
/* Marking EH data may cause additional code sections to be marked,
|
/* Marking EH data may cause additional code sections to be marked,
|
requiring multiple passes. */
|
requiring multiple passes. */
|
again = TRUE;
|
again = TRUE;
|
while (again)
|
while (again)
|
{
|
{
|
Line 14097... |
Line 14117... |
default:
|
default:
|
return reloc_class_normal;
|
return reloc_class_normal;
|
}
|
}
|
}
|
}
|
|
|
/* Set the right machine number for an Arm ELF file. */
|
|
|
|
static bfd_boolean
|
|
elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
|
|
{
|
|
if (hdr->sh_type == SHT_NOTE)
|
|
*flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
static void
|
static void
|
elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
|
elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
|
{
|
{
|
bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
|
bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
|
}
|
}
|
Line 15333... |
Line 15342... |
#define elf_backend_always_size_sections elf32_arm_always_size_sections
|
#define elf_backend_always_size_sections elf32_arm_always_size_sections
|
#define elf_backend_init_index_section _bfd_elf_init_2_index_sections
|
#define elf_backend_init_index_section _bfd_elf_init_2_index_sections
|
#define elf_backend_post_process_headers elf32_arm_post_process_headers
|
#define elf_backend_post_process_headers elf32_arm_post_process_headers
|
#define elf_backend_reloc_type_class elf32_arm_reloc_type_class
|
#define elf_backend_reloc_type_class elf32_arm_reloc_type_class
|
#define elf_backend_object_p elf32_arm_object_p
|
#define elf_backend_object_p elf32_arm_object_p
|
#define elf_backend_section_flags elf32_arm_section_flags
|
|
#define elf_backend_fake_sections elf32_arm_fake_sections
|
#define elf_backend_fake_sections elf32_arm_fake_sections
|
#define elf_backend_section_from_shdr elf32_arm_section_from_shdr
|
#define elf_backend_section_from_shdr elf32_arm_section_from_shdr
|
#define elf_backend_final_write_processing elf32_arm_final_write_processing
|
#define elf_backend_final_write_processing elf32_arm_final_write_processing
|
#define elf_backend_copy_indirect_symbol elf32_arm_copy_indirect_symbol
|
#define elf_backend_copy_indirect_symbol elf32_arm_copy_indirect_symbol
|
#define elf_backend_size_info elf32_arm_size_info
|
#define elf_backend_size_info elf32_arm_size_info
|