Skip to content

Commit 9eb16b2

Browse files
committed
[armv7] Add support for R_ARM_PC24 relocation
1 parent 6694102 commit 9eb16b2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

arch/armv7/arch_armv7.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2359,6 +2359,7 @@ class ArmElfRelocationHandler: public RelocationHandler
23592359
dest32[0] = (info.implicitAddend ? dest32[0] : (uint32_t)info.addend) + (target & ~1) - (uint32_t)reloc->GetAddress();
23602360
break;
23612361
}
2362+
case R_ARM_PC24:
23622363
case R_ARM_JUMP24:
23632364
{
23642365
if (target & 1)
@@ -2550,8 +2551,14 @@ class ArmElfRelocationHandler: public RelocationHandler
25502551
break;
25512552
case R_ARM_TLS_DTPOFF32:
25522553
break;
2553-
case R_ARM_SBREL31:
25542554
case R_ARM_PC24:
2555+
reloc.pcRelative = true;
2556+
reloc.baseRelative = false;
2557+
reloc.hasSign = false;
2558+
reloc.size = 3;
2559+
reloc.truncateSize = 3;
2560+
break;
2561+
case R_ARM_SBREL31:
25552562
case R_ARM_LDR_PC_G0:
25562563
case R_ARM_ABS16:
25572564
case R_ARM_ABS12:

0 commit comments

Comments
 (0)