From f61368970b11002d0a17e57094e90abd66055e27 Mon Sep 17 00:00:00 2001 From: Dmitry Koltunov Date: Thu, 6 Sep 2018 01:00:34 +0300 Subject: [PATCH] Fix division in calculation function for 'R_ARM_CALL' (#196) --- elftools/elf/relocation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elftools/elf/relocation.py b/elftools/elf/relocation.py index 59b6750..e245df4 100644 --- a/elftools/elf/relocation.py +++ b/elftools/elf/relocation.py @@ -220,7 +220,7 @@ class RelocationHandler(object): return sym_value + addend - offset def _arm_reloc_calc_sym_plus_value_pcrel(value, sym_value, offset, addend=0): - return sym_value / 4 + value - offset / 4 + return sym_value // 4 + value - offset // 4 _RELOCATION_RECIPES_ARM = { ENUM_RELOC_TYPE_ARM['R_ARM_ABS32']: _RELOCATION_RECIPE_TYPE( -- 2.30.2