summaryrefslogtreecommitdiff
path: root/src/model/check.c
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-02-23 16:08:26 +0000
committernorly <ny-git@enpas.org>2013-02-23 16:09:15 +0000
commit9b3f4d15112365dbda20c668d0d57a74bd05e60c (patch)
tree39de5a71062270f6d181b74b32dd8beb1da434ec /src/model/check.c
parent6e4cbafe0876ff14ff03a14ab80951167ef67e06 (diff)
Refactor mdoel-related code
Diffstat (limited to 'src/model/check.c')
-rw-r--r--src/model/check.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/model/check.c b/src/model/check.c
index dd5e8eb..c490d5d 100644
--- a/src/model/check.c
+++ b/src/model/check.c
@@ -43,7 +43,7 @@ static int cmpScnOffs(const void *ms1, const void *ms2)
}
-int elfu_modelCheck(ElfuElf *me)
+int elfu_mCheck(ElfuElf *me)
{
ElfuScn *ms;
size_t numSecs;
@@ -51,7 +51,7 @@ int elfu_modelCheck(ElfuElf *me)
size_t i;
/* Sort sections by offset in file */
- numSecs = elfu_countSections(me);
+ numSecs = elfu_mCountScns(me);
sortedSecs = malloc(numSecs * sizeof(*sortedSecs));
if (!sortedSecs) {
fprintf(stderr, "elfu_check: Failed to allocate memory.\n");
@@ -72,8 +72,8 @@ int elfu_modelCheck(ElfuElf *me)
if (sortedSecs[i]->shdr.sh_offset + elfu_gScnSizeFile(&sortedSecs[i]->shdr)
> sortedSecs[i+1]->shdr.sh_offset) {
fprintf(stderr, "elfu_check: Found overlapping sections: %s and %s.\n",
- elfu_modelScnName(me, sortedSecs[i]),
- elfu_modelScnName(me, sortedSecs[i+1]));
+ elfu_mScnName(me, sortedSecs[i]),
+ elfu_mScnName(me, sortedSecs[i+1]));
}
}
@@ -82,7 +82,7 @@ int elfu_modelCheck(ElfuElf *me)
for (i = 0; i < numSecs; i++) {
if (sortedSecs[i]->shdr.sh_offset < me->ehdr.e_ehsize) {
fprintf(stderr, "elfu_check: Found section overlapping with EHDR: %s.\n",
- elfu_modelScnName(me, sortedSecs[i]));
+ elfu_mScnName(me, sortedSecs[i]));
}
}
@@ -94,7 +94,7 @@ int elfu_modelCheck(ElfuElf *me)
me->ehdr.e_phoff,
me->ehdr.e_phentsize * me->ehdr.e_phnum)) {
fprintf(stderr, "elfu_check: Found section overlapping with PHDRs: %s.\n",
- elfu_modelScnName(me, sortedSecs[i]));
+ elfu_mScnName(me, sortedSecs[i]));
}
}