• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisiond92b1a8a2a1a736a4c5c125928dbab47a47551fc (tree)
Zeit2000-04-08 09:11:46
AutorNick Clifton <nickc@redh...>
CommiterNick Clifton

Log Message

Add support for BFD_RELOC_{ARM|THUMB}_PCREL_BLX relocs.

Ändern Zusammenfassung

Diff

--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
1+2000-04-07 Nick Clifton <nickc@cygnus.com>
2+
3+ * config/tc-arm.c (md_apply_fix3): Treat BFD_RELOC_ARM_PCREL_BLX
4+ in the same way as BFD_RELOC_ARM_PCREL_BRANCH, and
5+ BFD_RELOC_THUMB_PCREL_BLX lie BFD_RELOC_THUMB_PCREL_BRANCH.
6+ (tc_gen_reloc): Accept BFD_RELOC_{ARM|THUMB}_PCREL_BLX.
7+ (arm_force_relocation): Force relocations for
8+ BFD_RELOC_{ARM|THUMB}_PCREL_BLX as well.
9+
110 Wed Apr 5 22:26:32 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
211
312 * config/tc-sh.c (get_operands): There's no third operand if the
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -2661,8 +2661,8 @@ do_adr (str, flags)
26612661 inst.reloc.exp.X_add_number -= 8; /* PC relative adjust. */
26622662 inst.reloc.pc_rel = 1;
26632663 inst.instruction |= flags;
2664+
26642665 end_of_line (str);
2665- return;
26662666 }
26672667
26682668 static void
@@ -5370,6 +5370,7 @@ md_apply_fix3 (fixP, val, seg)
53705370 {
53715371 if (target_oabi
53725372 && (fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
5373+ || fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BLX
53735374 ))
53745375 value = 0;
53755376 else
@@ -5617,6 +5618,22 @@ md_apply_fix3 (fixP, val, seg)
56175618 md_number_to_chars (buf, newval, INSN_SIZE);
56185619 break;
56195620
5621+ case BFD_RELOC_ARM_PCREL_BLX:
5622+ {
5623+ offsetT hbit;
5624+ newval = md_chars_to_number (buf, INSN_SIZE);
5625+
5626+#ifdef OBJ_ELF
5627+ if (! target_oabi)
5628+ value = fixP->fx_offset;
5629+#endif
5630+ hbit = (value >> 1) & 1;
5631+ value = (value >> 2) & 0x00ffffff;
5632+ value = (value + (newval & 0x00ffffff)) & 0x00ffffff;
5633+ newval = value | (newval & 0xfe000000) | (hbit << 24);
5634+ md_number_to_chars (buf, newval, INSN_SIZE);
5635+ }
5636+ break;
56205637
56215638 case BFD_RELOC_THUMB_PCREL_BRANCH9: /* conditional branch */
56225639 newval = md_chars_to_number (buf, THUMB_SIZE);
@@ -5650,6 +5667,7 @@ md_apply_fix3 (fixP, val, seg)
56505667 md_number_to_chars (buf, newval, THUMB_SIZE);
56515668 break;
56525669
5670+ case BFD_RELOC_THUMB_PCREL_BLX:
56535671 case BFD_RELOC_THUMB_PCREL_BRANCH23:
56545672 {
56555673 offsetT newval2;
@@ -5956,10 +5974,12 @@ tc_gen_reloc (section, fixp)
59565974 }
59575975
59585976 case BFD_RELOC_ARM_PCREL_BRANCH:
5977+ case BFD_RELOC_ARM_PCREL_BLX:
59595978 case BFD_RELOC_RVA:
59605979 case BFD_RELOC_THUMB_PCREL_BRANCH9:
59615980 case BFD_RELOC_THUMB_PCREL_BRANCH12:
59625981 case BFD_RELOC_THUMB_PCREL_BRANCH23:
5982+ case BFD_RELOC_THUMB_PCREL_BLX:
59635983 case BFD_RELOC_VTABLE_ENTRY:
59645984 case BFD_RELOC_VTABLE_INHERIT:
59655985 code = fixp->fx_r_type;
@@ -6172,10 +6192,12 @@ md_assemble (str)
61726192 keep trying with progressively smaller basic instructions until one
61736193 matches, or we run out of opcode. */
61746194 q = (p - str > LONGEST_INST) ? str + LONGEST_INST : p;
6195+
61756196 for (; q != str; q--)
61766197 {
61776198 c = *q;
61786199 *q = '\0';
6200+
61796201 opcode = (CONST struct asm_opcode *) hash_find (arm_ops_hsh, str);
61806202 *q = c;
61816203
@@ -7102,6 +7124,8 @@ arm_force_relocation (fixp)
71027124 if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
71037125 || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY
71047126 || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH
7127+ || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BLX
7128+ || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX
71057129 || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23)
71067130 return 1;
71077131