mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Have ARM ELF use correct reloc for "b" instr.
The condition code didn't actually matter for arm "b" instructions, unlike "bl". It should just use the R_ARM_JUMP24 reloc. llvm-svn: 158722
This commit is contained in:
parent
12c1b6478a
commit
fa15c02364
@ -178,9 +178,8 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ARM::fixup_arm_uncondbl:
|
||||
case ARM::fixup_arm_blx:
|
||||
case ARM::fixup_arm_uncondbranch:
|
||||
case ARM::fixup_arm_uncondbl:
|
||||
switch (Modifier) {
|
||||
case MCSymbolRefExpr::VK_ARM_PLT:
|
||||
Type = ELF::R_ARM_PLT32;
|
||||
@ -192,6 +191,7 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
break;
|
||||
case ARM::fixup_arm_condbl:
|
||||
case ARM::fixup_arm_condbranch:
|
||||
case ARM::fixup_arm_uncondbranch:
|
||||
Type = ELF::R_ARM_JUMP24;
|
||||
break;
|
||||
case ARM::fixup_arm_movt_hi16:
|
||||
@ -252,10 +252,8 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
|
||||
case ARM::fixup_arm_thumb_cp:
|
||||
case ARM::fixup_arm_thumb_br:
|
||||
llvm_unreachable("Unimplemented");
|
||||
case ARM::fixup_arm_uncondbranch:
|
||||
Type = ELF::R_ARM_CALL;
|
||||
break;
|
||||
case ARM::fixup_arm_condbranch:
|
||||
case ARM::fixup_arm_uncondbranch:
|
||||
Type = ELF::R_ARM_JUMP24;
|
||||
break;
|
||||
case ARM::fixup_arm_movt_hi16:
|
||||
|
@ -4,6 +4,8 @@
|
||||
bleq some_label
|
||||
bl some_label
|
||||
blx some_label
|
||||
beq some_label
|
||||
b some_label
|
||||
// OBJ: .rel.text
|
||||
|
||||
// OBJ: 'r_offset', 0x00000000
|
||||
@ -18,6 +20,14 @@
|
||||
// OBJ-NEXT: 'r_sym', 0x000004
|
||||
// OBJ-NEXT: 'r_type', 0x1c
|
||||
|
||||
// OBJ: 'r_offset', 0x0000000c
|
||||
// OBJ-NEXT: 'r_sym', 0x000004
|
||||
// OBJ-NEXT: 'r_type', 0x1d
|
||||
|
||||
// OBJ: 'r_offset', 0x00000010
|
||||
// OBJ-NEXT: 'r_sym', 0x000004
|
||||
// OBJ-NEXT: 'r_type', 0x1d
|
||||
|
||||
// OBJ: .symtab
|
||||
// OBJ: Symbol 4
|
||||
// OBJ-NEXT: some_label
|
||||
// OBJ-NEXT: some_label
|
||||
|
Loading…
Reference in New Issue
Block a user