+2010-10-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
+ elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for
+ ip/r12.
+ (arm_type_of_stub): Remove superfluous braces.
+
2010-10-04 Bernd Schmidt <bernds@codesourcery.com>
* elf-bfd.h (struct bfd_elf_section_reloc_data): New structure.
blx to reach the stub if necessary. */
static const insn_sequence elf32_arm_stub_long_branch_any_arm_pic[] =
{
- ARM_INSN(0xe59fc000), /* ldr r12, [pc] */
+ ARM_INSN(0xe59fc000), /* ldr ip, [pc] */
ARM_INSN(0xe08ff00c), /* add pc, pc, ip */
DATA_WORD(0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X-4) */
};
ARMv7). */
static const insn_sequence elf32_arm_stub_long_branch_any_thumb_pic[] =
{
- ARM_INSN(0xe59fc004), /* ldr r12, [pc, #4] */
+ ARM_INSN(0xe59fc004), /* ldr ip, [pc, #4] */
ARM_INSN(0xe08fc00c), /* add ip, pc, ip */
ARM_INSN(0xe12fff1c), /* bx ip */
DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */
/* If a stub is needed, record the actual destination type. */
if (stub_type != arm_stub_none)
- {
- *actual_st_type = st_type;
- }
+ *actual_st_type = st_type;
return stub_type;
}
+2010-10-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-arm.c (encode_branch): Remove superfluous braces.
+ (do_t_branch): Move reloc setting to end of routine.
+
2010-10-04 David Daney <ddaney@caviumnetworks.com>
* config/tc-mips.c (mips_fix_cn63xxp1): New variable.
inst.reloc.type = BFD_RELOC_ARM_PLT32;
}
else
- {
- inst.reloc.type = (bfd_reloc_code_real_type) default_reloc;
- }
+ inst.reloc.type = (bfd_reloc_code_real_type) default_reloc;
inst.reloc.pc_rel = 1;
}
{
int opcode;
int cond;
+ int reloc;
cond = inst.cond;
set_it_insn_type (IF_INSIDE_IT_LAST_INSN);
{
inst.instruction = THUMB_OP32(opcode);
if (cond == COND_ALWAYS)
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH25;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH25;
else
{
gas_assert (cond != 0xF);
inst.instruction |= cond << 22;
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH20;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH20;
}
}
else
{
inst.instruction = THUMB_OP16(opcode);
if (cond == COND_ALWAYS)
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH12;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH12;
else
{
inst.instruction |= cond << 8;
- inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH9;
+ reloc = BFD_RELOC_THUMB_PCREL_BRANCH9;
}
/* Allow section relaxation. */
if (unified_syntax && inst.size_req != 2)
inst.relax = opcode;
}
-
+ inst.reloc.type = reloc;
inst.reloc.pc_rel = 1;
}