aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exec/exec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/exec/exec.c b/exec/exec.c
index a50ea632..9827cbe8 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -556,6 +556,13 @@ check_elf (struct execdata *e)
/* Extract all this information now, while EHDR is mapped.
The `map' call below for the phdrs may reuse the mapping window. */
e->entry = ehdr->e_entry;
+#ifdef ELIBEXEC
+ if (e->entry == 0)
+ {
+ e->error = ELIBEXEC;
+ return;
+ }
+#endif
e->info.elf.anywhere = (ehdr->e_type == ET_DYN ||
ehdr->e_type == ET_REL);
e->info.elf.loadbase = 0;