Turn elfu_gScnSizeFile into a macro
[centaur.git] / src / elfops / check.c
index c7ebc7d5ebfc92eec645b5b03f91137421aae26a..8aaa7b55291df3fefc2448b6761f77c4a710163e 100644 (file)
@@ -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;
         }