[Qemu-devel] fix ELF loading for 0-length sections
From:
Damian, Alexandru
Subject:
[Qemu-devel] fix ELF loading for 0-length sections
Date:
Tue, 21 Feb 2012 12:42:55 +0200
Hi,
I got a problem with QEMU refusing to load an ELF binary with 0-length sections, while the kernel has no issue doing this.
This patch adds a check that has been in kernel since 2008 at least.
Cheers,
Alex
---------------- commit a42e5231c1be5f09caeb6c73e34933cd7efa7023 Author: Alexandru DAMIAN <address@hidden> Date: Tue Feb 21 12:34:36 2012 +0200
Do not attempt to map 0-length sections
Mmap will return an invalid argument, but 0-length sections are valid in any case. The kernel as a similar check when loading elf binaries courtesy of address@hidden.