fixes target address tBL and tBLX and sets relocation type

of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6)

Patch by koan-sin tan.

llvm-svn: 131748
This commit is contained in:
Rafael Espindola
2011-05-20 20:01:01 +00:00
parent ac8bc12cd1
commit 1866808384
3 changed files with 50 additions and 2 deletions

View File

@@ -1441,6 +1441,17 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target,
case ARM::fixup_t2_movw_lo16_pcrel:
Type = ELF::R_ARM_THM_MOVW_PREL_NC;
break;
case ARM::fixup_arm_thumb_bl:
case ARM::fixup_arm_thumb_blx:
switch (Modifier) {
case MCSymbolRefExpr::VK_ARM_PLT:
Type = ELF::R_ARM_THM_CALL;
break;
default:
Type = ELF::R_ARM_NONE;
break;
}
break;
}
} else {
switch ((unsigned)Fixup.getKind()) {