Improve page size support

This commit is contained in:
Romain Thomas
2025-06-23 23:48:02 +02:00
parent 3e8fa7f946
commit e661bb7422
21 changed files with 278 additions and 19 deletions
@@ -56,6 +56,13 @@ void create<ParserConfig>(nb::module_& m) {
(:class:`lief.ELF.DYNSYM_COUNT_METHODS`). By default, the value is set to
:attr:`lief.ELF.DYNSYM_COUNT_METHODS.COUNT_AUTO`
)delim"_doc)
.def_rw("page_size", &ParserConfig::page_size,
R"doc(
Memory page size if the binary uses a non-standard value.
For instance, SPARCV9 binary can use a page size from 0x2000 to 0x100000.
)doc"_doc
)
.def_prop_ro_static("all",
[] (const nb::object& /* self */) { return ParserConfig::all(); },
@@ -722,10 +722,6 @@ void create<Binary>(nb::module_& m) {
"address"_a, "name"_a,
nb::rv_policy::reference_internal)
.def_prop_ro("page_size",
&Binary::page_size,
"Return the binary's page size"_doc)
.def_prop_ro("bindings",
[] (const Binary& self) {
auto bindings = self.bindings();