diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-03-28 01:00:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-03-28 01:00:33 (GMT) |
commit | 057cee1c3c109639af8f30e39e00f4884a353f31 (patch) | |
tree | 563972accde653fd562305424cb1983617bc0b4c /plugins/readelf/reader.c | |
parent | a6bedf6104ccd7d8050e9d6a58f32c0827e3383c (diff) |
Provided readelf features as an external plugin.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@495 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/readelf/reader.c')
-rw-r--r-- | plugins/readelf/reader.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/plugins/readelf/reader.c b/plugins/readelf/reader.c new file mode 100644 index 0000000..5da60b7 --- /dev/null +++ b/plugins/readelf/reader.c @@ -0,0 +1,66 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * reader.c - interprétation des informations secondaires contenues dans un fichier ELF + * + * Copyright (C) 2015 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * OpenIDA is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * OpenIDA is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Foobar. If not, see <http://www.gnu.org/licenses/>. + */ + + +#include "reader.h" + + +#include <plugins/plugin-def.h> + + +#include "header.h" +#include "program.h" +#include "section.h" + + + +DEFINE_CHRYSALIDE_ACTIVE_PLUGIN("readelf", "Displays information about ELF files", "0.1.0", + PGA_FORMAT_LOADER_LAST); + + +/****************************************************************************** +* * +* Paramètres : plugin = greffon à manipuler. * +* action = type d'action attendue. * +* format = description de l'exécutable à compléter. * +* * +* Description : Etablit des symboles complémentaires dans un format ELF. * +* * +* Retour : Bilan de l'opération. * +* * +* Remarques : - * +* * +******************************************************************************/ + +G_MODULE_EXPORT bool handle_binary_format(const GPluginModule *plugin, PluginAction action, GElfFormat *format) +{ + bool result; /* Bilan à retourner */ + + result = annotate_elf_header(format); + + result &= annotate_elf_program_header_table(format); + + result &= annotate_elf_section_header_table(format); + + return result; + +} |