From: Dmitry Koltunov Date: Wed, 5 Sep 2018 22:00:34 +0000 (+0300) Subject: Fix division in calculation function for 'R_ARM_CALL' (#196) X-Git-Tag: v0.26~36 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f61368970b11002d0a17e57094e90abd66055e27;p=pyelftools.git Fix division in calculation function for 'R_ARM_CALL' (#196) --- 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(