summaryrefslogtreecommitdiff
path: root/plugins/elf/python/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elf/python/format.c')
-rw-r--r--plugins/elf/python/format.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/elf/python/format.c b/plugins/elf/python/format.c
index 6b44703..a3d8758 100644
--- a/plugins/elf/python/format.c
+++ b/plugins/elf/python/format.c
@@ -38,6 +38,7 @@
#include "constants.h"
#include "dynamic.h"
+#include "elf_def.h"
#include "program.h"
#include "section.h"
#include "translate.h"
@@ -219,11 +220,40 @@ PyTypeObject *get_python_elf_format_type(void)
METH_VARARGS,
"find_sections_by_type($self, type, /)\n--\n\nFind sections using a given type."
},
+ {
+ "find_dynamic_item_by_index", py_elf_format_find_dynamic_item_by_index,
+ METH_VARARGS,
+ "find_dynamic_item_by_type($self, type, /)\n--\n\nFind an item from the dynamic segment using a given index."
+ },
{ NULL }
};
static PyGetSetDef py_elf_format_getseters[] = {
{
+ "sizeof_hdr", py_elf_format_get_sizeof_hdr, NULL,
+ "Provide the size of Elf_Ehdr structures for the loaded format.", NULL
+ },
+ {
+ "sizeof_phdr", py_elf_format_get_sizeof_phdr, NULL,
+ "Provide the size of Elf_Phdr structures for the loaded format.", NULL
+ },
+ {
+ "sizeof_shdr", py_elf_format_get_sizeof_shdr, NULL,
+ "Provide the size of Elf_Shdr structures for the loaded format.", NULL
+ },
+ {
+ "sizeof_dyn", py_elf_format_get_sizeof_dyn, NULL,
+ "Provide the size of Elf_Dyn structures for the loaded format.", NULL
+ },
+ {
+ "sizeof_sym", py_elf_format_get_sizeof_sym, NULL,
+ "Provide the size of Elf_Sym structures for the loaded format.", NULL
+ },
+ {
+ "sizeof_rel", py_elf_format_get_sizeof_rel, NULL,
+ "Provide the size of Elf_Rel structures for the loaded format.", NULL
+ },
+ {
"needed", py_elf_format_get_needed, NULL,
"Provide the list of requiered shared objects.", NULL
},