This commit cleans and modernizes the code base of LIEF.

Among the changes:

- It removes the ``and, or, not`` keywords
- It updates the Documentation
- It moves the internal structures in the ``details::`` namespace
This commit is contained in:
rthomas
2022-01-27 18:50:12 +01:00
committed by Romain Thomas
parent 540049d0d9
commit a615adbee4
625 changed files with 15701 additions and 15535 deletions
+16 -3
View File
@@ -35,16 +35,29 @@ using it_t = T (Relocation::*)(void);
template<>
void create<Relocation>(py::module& m) {
py::class_<Relocation, LIEF::Object>(m, "Relocation")
py::class_<Relocation, LIEF::Object>(m, "Relocation",
R"delim(
Class which represents the *Base Relocation Block*
Usually, we find this structure in the ``.reloc`` section
)delim")
.def(py::init<>())
.def_property("virtual_address",
static_cast<getter_t<uint32_t>>(&Relocation::virtual_address),
static_cast<setter_t<uint32_t>>(&Relocation::virtual_address))
static_cast<setter_t<uint32_t>>(&Relocation::virtual_address),
"The RVA for which the offset of the relocation entries (RelocationEntry) is added")
.def_property("block_size",
static_cast<getter_t<uint32_t>>(&Relocation::block_size),
static_cast<setter_t<uint32_t>>(&Relocation::block_size),
R"delim(
The total number of bytes in the base relocation block.
``block_size = sizeof(BaseRelocationBlock) + nb_of_relocs * sizeof(uint16_t = RelocationEntry)``
)delim")
.def_property_readonly("entries",
static_cast<it_t<it_relocation_entries>>(&Relocation::entries),
py::return_value_policy::reference_internal)
"Iterator over the " RST_CLASS_REF(lief.PE.RelocationEntry) "")
.def("add_entry",
&Relocation::add_entry,