From: David Gibson Date: Sun, 8 Jan 2006 09:03:35 +0000 (-0800) Subject: [PATCH] Fix handling of ELF segments with zero filesize X-Git-Tag: v2.6.16-rc1~748 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dda6ebde96044e9b5f1b14588659b39b4e6c08e7;p=pandora-kernel.git [PATCH] Fix handling of ELF segments with zero filesize mmap() returns -EINVAL if given a zero length, and thus elf_map() in binfmt_elf.c does likewise if it attempts to map a (page-aligned) ELF segment with zero filesize. Such a situation never arises with the default linker scripts, but there's nothing inherently wrong with zero-filesize (but non-zero memsize) ELF segments. Custom linker scripts can generate them, and the kernel should be able to map them; this patch makes it so. Signed-off-by: David Gibson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed