diff options
author | norly <ny-git@enpas.org> | 2013-05-27 03:18:00 +0100 |
---|---|---|
committer | norly <ny-git@enpas.org> | 2013-05-27 03:18:00 +0100 |
commit | 29dfd585e8f8d87d978259919f74815493899f01 (patch) | |
tree | 570de3bd6861dfb085234a1ab0440feb77fbf804 /src/elfops | |
parent | f4d5a2e8d569d68fe4fa536e4ce9c3aee7c9285c (diff) |
Turn elfu_gScnSizeFile into a macro
Diffstat (limited to 'src/elfops')
-rw-r--r-- | src/elfops/check.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/elfops/check.c b/src/elfops/check.c index c7ebc7d..8aaa7b5 100644 --- a/src/elfops/check.c +++ b/src/elfops/check.c @@ -126,14 +126,14 @@ int elfu_eCheck(Elf *e) } /* Section should not overlap with PHDRs. */ - if (OVERLAPPING(shdrs[i].sh_offset, elfu_gScnSizeFile(&shdrs[i]), + if (OVERLAPPING(shdrs[i].sh_offset, SCNFILESIZE(&shdrs[i]), ehdr.e_phoff, numPhdr * ehdr.e_phentsize)) { ELFU_WARN("elfu_eCheck: Section %d overlaps with PHDR.\n", i); goto ERROR; } /* Section should not overlap with SHDRs. */ - if (OVERLAPPING(shdrs[i].sh_offset, elfu_gScnSizeFile(&shdrs[i]), + if (OVERLAPPING(shdrs[i].sh_offset, SCNFILESIZE(&shdrs[i]), ehdr.e_shoff, numShdr * ehdr.e_shentsize)) { ELFU_WARN("elfu_eCheck: Section %d overlaps with SHDRs.\n", i); goto ERROR; @@ -154,8 +154,8 @@ int elfu_eCheck(Elf *e) } /* Sections must not overlap in file. */ - if (OVERLAPPING(shdrs[i].sh_offset, elfu_gScnSizeFile(&shdrs[i]), - shdrs[j].sh_offset, elfu_gScnSizeFile(&shdrs[j]))) { + if (OVERLAPPING(shdrs[i].sh_offset, SCNFILESIZE(&shdrs[i]), + shdrs[j].sh_offset, SCNFILESIZE(&shdrs[j]))) { ELFU_WARN("elfu_eCheck: Sections %d and %d overlap in file.\n", i, j); goto ERROR; } |