Add relocation in the Abstract layer

The abstracted attributes are:
  * Address: virtual address where the relocation occurs
  * Size: size in bits of the relocation

See: LIEF::Relocation / lief.Relocation and abstract_reader

Resolve: #53
This commit is contained in:
Romain Thomas
2017-09-05 22:00:31 +02:00
parent 58bf7a2987
commit 9503f2fc7b
42 changed files with 785 additions and 214 deletions
+1 -7
View File
@@ -32,7 +32,7 @@ using setter_t = void (Relocation::*)(T);
void init_MachO_Relocation_class(py::module& m) {
py::class_<Relocation>(m, "Relocation")
py::class_<Relocation, LIEF::Relocation>(m, "Relocation")
.def_property("address",
static_cast<getter_t<uint64_t>>(&Relocation::address),
@@ -56,12 +56,6 @@ void init_MachO_Relocation_class(py::module& m) {
"the instruction to the address contained in the instruction.",
py::return_value_policy::reference_internal)
.def_property("size",
static_cast<getter_t<uint8_t>>(&Relocation::size),
static_cast<setter_t<uint8_t>>(&Relocation::size),
"Indicates the length (in bits) of the item containing the address to be relocated.",
py::return_value_policy::reference_internal)
.def_property("type",
static_cast<getter_t<uint8_t>>(&Relocation::type),
static_cast<setter_t<uint8_t>>(&Relocation::type),