Big re-sync with UPX 1.2 branch.

committer: mfx <mfx> 1026835258 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2002-07-16 16:00:58 +00:00
parent 4a462f3c9a
commit 666e8c2f2f
62 changed files with 1637 additions and 727 deletions
+5 -2
View File
@@ -227,7 +227,7 @@ unsigned optimize_relocs(upx_byte *b, const unsigned size,
const upx_byte *relocs, const unsigned nrelocs,
upx_byte *crel, bool *has_9a)
{
upx_byte *crel_save = crel;
upx_byte * const crel_save = crel;
unsigned i;
unsigned seg_high = 0;
#if 0
@@ -486,7 +486,10 @@ void PackExe::pack(OutputFile *fo)
oh.relocs = 0;
oh.firstreloc = ih.cs*0x10000 + ih.ip;
}
oh.relocoffs = offsetof(exe_header_t, firstreloc);
// g++ 3.1 does not like the following line...
// oh.relocoffs = offsetof(exe_header_t, firstreloc);
oh.relocoffs = ptr_diff(&oh.firstreloc, &oh);
if (flag & SP)
patch_le16(loader,lsize,"SP",ih.sp);