aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 162fb30af3..5ff472a46b 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1520,18 +1520,18 @@ open_verify (const char *name, struct filebuf *fbp)
}
if (! __builtin_expect (elf_machine_matches_host (ehdr), 1))
goto close_and_out;
- else if (__builtin_expect (ehdr->e_phentsize, sizeof (ElfW(Phdr)))
- != sizeof (ElfW(Phdr)))
- {
- errstring = N_("ELF file's phentsize not the expected size");
- goto call_lose;
- }
else if (__builtin_expect (ehdr->e_type, ET_DYN) != ET_DYN
&& __builtin_expect (ehdr->e_type, ET_EXEC) != ET_EXEC)
{
errstring = N_("only ET_DYN and ET_EXEC can be loaded");
goto call_lose;
}
+ else if (__builtin_expect (ehdr->e_phentsize, sizeof (ElfW(Phdr)))
+ != sizeof (ElfW(Phdr)))
+ {
+ errstring = N_("ELF file's phentsize not the expected size");
+ goto call_lose;
+ }
maplength = ehdr->e_phnum * sizeof (ElfW(Phdr));
if (ehdr->e_phoff + maplength <= (size_t) fbp->len)