mirror of
https://github.com/lief-project/LIEF
synced 2026-06-08 15:30:44 +00:00
Add support for Mach-O LC_SUBCLIENT command
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "LIEF/MachO/SegmentSplitInfo.hpp"
|
||||
#include "LIEF/MachO/SourceVersion.hpp"
|
||||
#include "LIEF/MachO/SubFramework.hpp"
|
||||
#include "LIEF/MachO/SubClient.hpp"
|
||||
#include "LIEF/MachO/Symbol.hpp"
|
||||
#include "LIEF/MachO/SymbolCommand.hpp"
|
||||
#include "LIEF/MachO/ThreadCommand.hpp"
|
||||
@@ -82,6 +83,7 @@ void create<Binary>(nb::module_& m) {
|
||||
init_ref_iterator<Binary::it_libraries>(bin, "it_libraries");
|
||||
init_ref_iterator<Binary::it_relocations>(bin, "it_relocations");
|
||||
init_ref_iterator<Binary::it_rpaths>(bin, "it_rpaths");
|
||||
init_ref_iterator<Binary::it_sub_clients>(bin, "it_sub_clients");
|
||||
|
||||
nb::class_<Binary::range_t>(bin, "range_t")
|
||||
.def_rw("start", &Binary::range_t::start)
|
||||
@@ -345,9 +347,14 @@ void create<Binary>(nb::module_& m) {
|
||||
"Return the binary's " RST_CLASS_REF(lief.MachO.SegmentSplitInfo) " if any, or None"_doc,
|
||||
nb::rv_policy::reference_internal)
|
||||
|
||||
.def_prop_ro("has_sub_framework",
|
||||
&Binary::has_sub_framework,
|
||||
"``True`` if the binary has a " RST_CLASS_REF(lief.MachO.SubFramework) " command"_doc)
|
||||
.def_prop_ro("subclients",
|
||||
nb::overload_cast<>(&Binary::subclients),
|
||||
"Return an iterator over the binary's " RST_CLASS_REF(lief.MachO.SubClient) ""_doc,
|
||||
nb::keep_alive<0, 1>())
|
||||
|
||||
.def_prop_ro("has_subclients",
|
||||
&Binary::has_subclients,
|
||||
"``True`` if the binary has a " RST_CLASS_REF(lief.MachO.SubClient) " command"_doc)
|
||||
|
||||
.def_prop_ro("sub_framework",
|
||||
nb::overload_cast<>(&Binary::sub_framework),
|
||||
|
||||
Reference in New Issue
Block a user