1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

amd64 output PT_LOAD[0] ends after loader

This commit is contained in:
John Reiser 2011-05-20 10:29:04 -07:00
parent 1996a0a3d6
commit 0c052e4506

View File

@ -2583,7 +2583,7 @@ void PackLinuxElf64::pack4(OutputFile *fo, Filter &ft)
// Cannot pre-round .p_memsz. If .p_filesz < .p_memsz, then kernel
// tries to make .bss, which requires PF_W.
// But strict SELinux (or PaX, grSecurity) disallows PF_W with PF_X.
set_te64(&elfout.phdr[0].p_filesz, sz_pack2 + len);
set_te64(&elfout.phdr[0].p_filesz, sz_pack2 + lsize);
elfout.phdr[0].p_memsz = elfout.phdr[0].p_filesz;
super::pack4(fo, ft); // write PackHeader and overlay_offset