summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mobicore/mclf.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/mobicore/mclf.c b/plugins/mobicore/mclf.c
index 7b1249c..8e99fc7 100644
--- a/plugins/mobicore/mclf.c
+++ b/plugins/mobicore/mclf.c
@@ -54,7 +54,7 @@ static void g_mclf_format_finalize(GMCLFFormat *);
static const char *g_mclf_format_get_target_machine(const GMCLFFormat *);
/* Etend la définition des portions au sein d'un binaire. */
-static void g_mclf_format_refine_portions(const GMCLFFormat *, GBinPortion *);
+static void g_mclf_format_refine_portions(const GMCLFFormat *, GPortionLayer *);
@@ -261,7 +261,7 @@ static const char *g_mclf_format_get_target_machine(const GMCLFFormat *format)
/******************************************************************************
* *
* Paramètres : format = informations chargées à consulter. *
-* raw = portion de binaire brut à raffiner. *
+* main = couche de portions principale à raffiner. *
* *
* Description : Etend la définition des portions au sein d'un binaire. *
* *
@@ -271,13 +271,18 @@ static const char *g_mclf_format_get_target_machine(const GMCLFFormat *format)
* *
******************************************************************************/
-static void g_mclf_format_refine_portions(const GMCLFFormat *format, GBinPortion *raw)
+static void g_mclf_format_refine_portions(const GMCLFFormat *format, GPortionLayer *main)
{
+ GPortionLayer *layer; /* Couche à mettre en place */
GBinPortion *new; /* Nouvelle portion définie */
char desc[MAX_PORTION_DESC]; /* Description d'une portion */
phys_t length; /* Taille de portion globale */
vmpa2t addr; /* Emplacement dans le binaire */
+ layer = g_portion_layer_new(NO_LENGTH_YET, _("Segment"));
+
+ g_portion_layer_attach_sub(main, layer);
+
/* Segment de code */
new = g_binary_portion_new(BPC_CODE);
@@ -290,7 +295,7 @@ static void g_mclf_format_refine_portions(const GMCLFFormat *format, GBinPortion
g_binary_portion_set_rights(new, PAC_WRITE | PAC_EXEC);
- g_binary_portion_include(raw, new);
+ g_portion_layer_include(layer, new);
/* Segment de données */
@@ -304,7 +309,7 @@ static void g_mclf_format_refine_portions(const GMCLFFormat *format, GBinPortion
g_binary_portion_set_rights(new, PAC_READ | PAC_WRITE);
- g_binary_portion_include(raw, new);
+ g_portion_layer_include(layer, new);
/* Signature finale */
@@ -319,6 +324,6 @@ static void g_mclf_format_refine_portions(const GMCLFFormat *format, GBinPortion
g_binary_portion_set_rights(new, PAC_READ | PAC_WRITE);
- g_binary_portion_include(raw, new);
+ g_portion_layer_include(layer, new);
}