summaryrefslogtreecommitdiff
path: root/plugins/readelf/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/readelf/reader.c')
-rw-r--r--plugins/readelf/reader.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/plugins/readelf/reader.c b/plugins/readelf/reader.c
index 5da60b7..2d10540 100644
--- a/plugins/readelf/reader.c
+++ b/plugins/readelf/reader.c
@@ -51,15 +51,26 @@ DEFINE_CHRYSALIDE_ACTIVE_PLUGIN("readelf", "Displays information about ELF files
* *
******************************************************************************/
-G_MODULE_EXPORT bool handle_binary_format(const GPluginModule *plugin, PluginAction action, GElfFormat *format)
+G_MODULE_EXPORT bool handle_binary_format(const GPluginModule *plugin, PluginAction action, GBinFormat *format)
{
bool result; /* Bilan à retourner */
+ GElfFormat *elf_fmt; /* Version ELF */
- result = annotate_elf_header(format);
+ if (!G_IS_ELF_FORMAT(format))
+ {
+ result = true;
+ goto hbf_exit;
+ }
- result &= annotate_elf_program_header_table(format);
+ elf_fmt = G_ELF_FORMAT(format);
- result &= annotate_elf_section_header_table(format);
+ result = annotate_elf_header(elf_fmt);
+
+ result &= annotate_elf_program_header_table(elf_fmt);
+
+ result &= annotate_elf_section_header_table(elf_fmt);
+
+ hbf_exit:
return result;