# -*- coding: utf-8 -*-
-
# kate: space-indent on; indent-width 2; mixedindent off; indent-mode python;
# Copyright (C) 2009 Amand 'alrj' Tihon <amand.tihon@alrj.org>
# This file is part of bold, the Byte Optimized Linker.
#
# You can redistribute this file and/or modify it under the terms of the
-# GNU Lesser General Public License as published by the Free Software
-# Foundation, version 2.1.
+# GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License or (at your option) any later version.
from BinArray import BinArray
def nested_property(c):
return property(**c())
+
#--------------------------------------------------------------------------
# Elf
#--------------------------------------------------------------------------
elif reloc.r_type == R_X86_64_32:
format = "<I" # Direct 32 bit zero extended
target_value = sym_address + reloc.r_addend
+ elif reloc.r_type == R_X86_64_32S:
+ format = "<i" # Direct 32 bit sign extended
+ target_value = sym_address + reloc.r_addend
elif reloc.r_type == R_X86_64_PC16:
format = "<h" # 16 bit sign extended pc relative
target_value = sym_address + reloc.r_addend - pc_address