This fixes a bug as well. When "FileSize:" (p_filesz) is specified and
different from the actual value, the following code probably should not
use PHeader.p_filesz:
if (SHeader->sh_offset == PHeader.p_offset + PHeader.p_filesz) PHeader.p_memsz += SHeader->sh_size;
When I first saw FileEnd I thought it is somehow related to the end of file.
Maybe FileOffset vs MemOffset is better? (Or some different better names)