summaryrefslogtreecommitdiff
path: root/plugins/mobicore
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-07-24 18:43:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-07-24 18:43:55 (GMT)
commit156d2e2f6beda2302552ac79678494d914fda05b (patch)
tree021825960b7ac3315a336fc085a4f1d07c05df39 /plugins/mobicore
parent21537636cd8318cf5a720211619ad3c3023b52e9 (diff)
Replaced all remaining raw accesses to binary contents with the GBinContent wrapper in binary formats.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@555 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/mobicore')
-rw-r--r--plugins/mobicore/annotations.c8
-rw-r--r--plugins/mobicore/mclf-int.c4
-rw-r--r--plugins/mobicore/mclf.c4
3 files changed, 9 insertions, 7 deletions
diff --git a/plugins/mobicore/annotations.c b/plugins/mobicore/annotations.c
index 94fecaf..f6ffa55 100644
--- a/plugins/mobicore/annotations.c
+++ b/plugins/mobicore/annotations.c
@@ -72,7 +72,7 @@ static bool annotate_mclf_segment_descriptor(GMCLFFormat *format, const char *pr
GDbComment *comment; /* Définition de commentaire */
GBinSymbol *symbol; /* Symbole à intégrer */
- content = G_BIN_FORMAT(format)->conten_;
+ content = G_BIN_FORMAT(format)->content;
/* start */
@@ -123,7 +123,7 @@ static bool annotate_mclf_intro(GMCLFFormat *format, vmpa2t *pos)
GDbComment *comment; /* Définition de commentaire */
GBinSymbol *symbol; /* Symbole à intégrer */
- content = G_BIN_FORMAT(format)->conten_;
+ content = G_BIN_FORMAT(format)->content;
init_vmpa(pos, 0, format->header.v1.text.start);
@@ -170,7 +170,7 @@ static bool annotate_mclf_header_v1(GMCLFFormat *format, vmpa2t *pos)
GBinSymbol *symbol; /* Symbole à intégrer */
const char *text; /* Commentaire variable */
- content = G_BIN_FORMAT(format)->conten_;
+ content = G_BIN_FORMAT(format)->content;
/* flags */
@@ -358,7 +358,7 @@ static bool annotate_mclf_text_segment_header(GMCLFFormat *format, vmpa2t *pos)
GDbComment *comment; /* Définition de commentaire */
GBinSymbol *symbol; /* Symbole à intégrer */
- content = G_BIN_FORMAT(format)->conten_;
+ content = G_BIN_FORMAT(format)->content;
copy_vmpa(&old, pos);
init_vmpa(pos, 0x80, format->header.v1.text.start + 0x80);
diff --git a/plugins/mobicore/mclf-int.c b/plugins/mobicore/mclf-int.c
index 2f2300d..cb4dbb3 100644
--- a/plugins/mobicore/mclf-int.c
+++ b/plugins/mobicore/mclf-int.c
@@ -45,7 +45,7 @@ bool read_mclf_header(GMCLFFormat *format, mclf_header_t *header, SourceEndian e
GBinContent *content; /* Contenu binaire à lire */
vmpa2t pos; /* Position de lecture */
- content = G_BIN_FORMAT(format)->conten_;
+ content = G_BIN_FORMAT(format)->content;
init_vmpa(&pos, 0, VMPA_NO_VIRTUAL);
@@ -112,7 +112,7 @@ bool read_mclf_segment_desc(GMCLFFormat *format, segment_descriptor_t *segment,
bool result; /* Bilan à retourner */
GBinContent *content; /* Contenu binaire à lire */
- content = G_BIN_FORMAT(format)->conten_;
+ content = G_BIN_FORMAT(format)->content;
result = g_binary_content_read_u32(content, pos, endian, &segment->start);
result &= g_binary_content_read_u32(content, pos, endian, &segment->len);
diff --git a/plugins/mobicore/mclf.c b/plugins/mobicore/mclf.c
index c456c04..245508f 100644
--- a/plugins/mobicore/mclf.c
+++ b/plugins/mobicore/mclf.c
@@ -212,6 +212,7 @@ static void g_mclf_format_refine_portions(const GMCLFFormat *format, GBinPortion
{
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 */
/* Segment de code */
@@ -249,7 +250,8 @@ static void g_mclf_format_refine_portions(const GMCLFFormat *format, GBinPortion
sprintf(desc, "%s \"%s\"", _("Segment"), "sig");
g_binary_portion_set_desc(new, desc);
- init_vmpa(&addr, G_BIN_FORMAT(format)->length - 521, VMPA_NO_VIRTUAL); /* FIXME */
+ length = g_binary_content_compute_size(G_BIN_FORMAT(format)->content);
+ init_vmpa(&addr, length - 521, VMPA_NO_VIRTUAL); /* FIXME */
g_binary_portion_set_values(new, &addr, 521);
g_binary_portion_set_rights(new, PAC_READ | PAC_WRITE);