diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-02-16 17:58:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-02-16 17:58:35 (GMT) |
commit | d5e94fd2895a5f9c4903bdaddf75727a54aec181 (patch) | |
tree | d2f11a1862e6df3d86c4f65aeb98e6fc04e7cf3b /plugins/elf/python/format.c | |
parent | d93d67a2408fd5c09e73b40fdbd28d4914254a90 (diff) |
Extended the ELF format support.
Diffstat (limited to 'plugins/elf/python/format.c')
-rw-r--r-- | plugins/elf/python/format.c | 30 |
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 }, |