summaryrefslogtreecommitdiff
path: root/src/format/exe_format.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-03-11 22:59:46 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-03-11 22:59:46 (GMT)
commitc4231094c9c77c685371d726d28e65c0459486de (patch)
tree2d4bb57239cb46bd2b1194c853c3a7263e487455 /src/format/exe_format.c
parent29a22c425f492427f45b71de937f2d99587c8d34 (diff)
Inserted comments into disassembled code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@53 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/exe_format.c')
-rw-r--r--src/format/exe_format.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/format/exe_format.c b/src/format/exe_format.c
index 8a03243..be0e1f1 100644
--- a/src/format/exe_format.c
+++ b/src/format/exe_format.c
@@ -178,6 +178,31 @@ void delete_bin_part(bin_part *part)
}
+/******************************************************************************
+* *
+* Paramètres : a = premières informations à consulter. *
+* b = secondes informations à consulter. *
+* *
+* Description : Etablit la comparaison entre deux blocs binaires. *
+* *
+* Retour : Bilan : -1 (a < b), 0 (a == b) ou 1 (a > b). *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+int compare_bin_parts(const bin_part **a, const bin_part **b)
+{
+ int result; /* Bilan à renvoyer */
+
+ if ((*a)->offset < (*b)->offset) result = -1;
+ else if((*a)->offset > (*b)->offset) result = 1;
+ else result = 0;
+
+ return result;
+
+}
+
@@ -378,3 +403,23 @@ bool resolve_exe_symbol(const exe_format *format, char **label, SymbolType *type
return format->resolve_symbol(format, label, type, offset);
}
+
+
+/******************************************************************************
+* *
+* Paramètres : format = informations chargées à consulter. *
+* count = taille du tableau créé. [OUT] *
+* *
+* Description : Fournit le prototype de toutes les routines détectées. *
+* *
+* Retour : Tableau créé ou NULL si aucun symbole de routine trouvé. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bin_routine **get_all_exe_routines(const exe_format *format, size_t *count)
+{
+ return format->get_all_routines(format, count);
+
+}