mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
#undef PAGE_{MASK,SIZE} to fix build problems on some machines.
committer: mfx <mfx> 1139743226 +0000
This commit is contained in:
parent
24ce1ef5e7
commit
51ac5172f5
|
@ -894,6 +894,8 @@ void PackLinuxElf64amd::pack3(OutputFile *fo, Filter &ft)
|
|||
fo->write(&zero, frag);
|
||||
len += frag;
|
||||
|
||||
#undef PAGE_MASK
|
||||
#undef PAGE_SIZE
|
||||
#define PAGE_MASK (~0u<<12)
|
||||
#define PAGE_SIZE (-PAGE_MASK)
|
||||
upx_byte *const p = const_cast<upx_byte *>(getLoader());
|
||||
|
|
|
@ -215,6 +215,7 @@ PackLinuxI386::pack4(OutputFile *fo, Filter &ft)
|
|||
fo->write(shstrtab, sizeof(shstrtab));
|
||||
#endif // }
|
||||
|
||||
#undef PAGE_MASK
|
||||
#define PAGE_MASK (~0u<<12)
|
||||
// pre-calculate for benefit of runtime disappearing act via munmap()
|
||||
elfout.phdr[0].p_memsz = PAGE_MASK & (~PAGE_MASK + elfout.phdr[0].p_filesz);
|
||||
|
|
|
@ -129,12 +129,13 @@ void PackLinuxI386interp::pack2(OutputFile *fo, Filter &ft)
|
|||
super::pack2(fo, ft);
|
||||
}
|
||||
|
||||
#undef PAGE_MASK
|
||||
#define PAGE_MASK (~0u<<12)
|
||||
|
||||
void PackLinuxI386interp::pack3(OutputFile *fo, Filter &/*ft*/)
|
||||
{
|
||||
unsigned long base = getbase(phdri, ehdri.e_phnum);
|
||||
unsigned long sz = PAGE_MASK & (~PAGE_MASK + elfout.phdr[0].p_filesz);
|
||||
unsigned base = getbase(phdri, ehdri.e_phnum);
|
||||
unsigned sz = PAGE_MASK & (~PAGE_MASK + elfout.phdr[0].p_filesz);
|
||||
if (base < (0x11000 + sz)) {
|
||||
base = 0x11000 + sz;
|
||||
}
|
||||
|
|
|
@ -231,6 +231,8 @@ PackMachPPC32::pack2(OutputFile *fo, Filter &ft) // append compressed body
|
|||
segcmdo.filesize = fo->getBytesWritten();
|
||||
}
|
||||
|
||||
#undef PAGE_MASK
|
||||
#undef PAGE_SIZE
|
||||
#define PAGE_MASK (~0u<<12)
|
||||
#define PAGE_SIZE -PAGE_MASK
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user