summaryrefslogtreecommitdiff
path: root/src/format/exe_format.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-04-12 19:15:35 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-04-12 19:15:35 (GMT)
commit216a3d0121fabd678e50ea6b4fa2447ae9b921f0 (patch)
tree395fcd91b674ff5652e34b46207ba08cc9e7af68 /src/format/exe_format.c
parentedac614a164d9cac345d914f4320d71bdb16ab79 (diff)
Created a debugging layout and introduced a heavier use of GLib.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@58 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/exe_format.c')
-rw-r--r--src/format/exe_format.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/format/exe_format.c b/src/format/exe_format.c
index 89b0b3b..2b8f893 100644
--- a/src/format/exe_format.c
+++ b/src/format/exe_format.c
@@ -29,6 +29,9 @@
#include "exe_format-int.h"
+#include "elf/e_elf.h"
+#include "java/e_java.h"
+#include "pe/e_pe.h"
#include "../panel/log.h"
@@ -57,6 +60,10 @@ static registered_exe_format *exe_formats = NULL;
static size_t exe_formats_count = 0;
+/* Enregistre la disponibilité d'un nouveau format exécutable. */
+void register_exe_format(const char *, exe_match_fc, exe_load_fc);
+
+
/* ---------------------------------------------------------------------------------- */
@@ -220,6 +227,29 @@ int compare_bin_parts(const bin_part **a, const bin_part **b)
/******************************************************************************
* *
+* Paramètres : - *
+* *
+* Description : Procède au chargement des formats d'exécutables reconnus. *
+* *
+* Retour : true pour indiquer un chargement réussi, false sinon. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool init_all_exe_formats(void)
+{
+ register_exe_format(_("ELF"), elf_is_matching, load_elf);
+ register_exe_format(_("Java"), java_is_matching, load_java);
+ register_exe_format(_("Portable Executable"), pe_is_matching, load_pe);
+
+ return true;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : name = désignation humaine associée. *
* match = procédure de reconnaissance fournie. *
* load = fonction de chargement fournie. *