summaryrefslogtreecommitdiffstats
path: root/src/elflint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elflint.c')
-rw-r--r--src/elflint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/elflint.c b/src/elflint.c
index e5917392..06930ca8 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -3829,7 +3829,8 @@ loadable segment GNU_RELRO applies to is executable\n"));
program header offset in ELF header and PHDR entry do not match"));
}
- if (phdr->p_filesz > phdr->p_memsz)
+ if (phdr->p_filesz > phdr->p_memsz
+ && (phdr->p_memsz != 0 || phdr->p_type == PT_LOAD))
ERROR (gettext ("\
program header entry %d: file size greater than memory size\n"),
cnt);