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

Removed Packer::patchVersion() and Packer::patchVersionYear().

This commit is contained in:
Markus F.X.J. Oberhumer 2006-08-21 20:28:14 +02:00
parent 6f1cc2c1e5
commit 9f20ddc800
3 changed files with 0 additions and 39 deletions

View File

@ -633,11 +633,6 @@ void PackTos::pack(OutputFile *fo)
memcpy(obuf+d_off, getLoader() + e_len, d_len);
patchPackHeader(loader, o_text);
#if 0
patchVersionYear(loader, o_text);
if (!opt->small)
patchVersion(loader, o_text);
#endif
// write new file header, loader and compressed file
fo->write(&oh, FH_SIZE);

View File

@ -828,38 +828,6 @@ int Packer::patch_le32(void *b, int blen, const void *old, unsigned new_)
}
// patch version into stub/ident_n.ash
int Packer::patchVersion(void *b, int blen)
{
int boff = find(b, blen, "$Id: UPX UPXV ", 14);
checkPatch(b, blen, boff, 14);
unsigned char *p = (unsigned char *)b + boff + 9;
if (opt->debug.fake_stub_version[0])
memcpy(p, opt->debug.fake_stub_version, 4);
else
memcpy(p, UPX_VERSION_STRING4, 4);
return boff;
}
// patch year into stub/ident_[ns].ash
int Packer::patchVersionYear(void *b, int blen)
{
int boff = find(b, blen, " 1996-UPXY ", 11);
checkPatch(b, blen, boff, 11);
unsigned char *p = (unsigned char *)b + boff + 6;
if (opt->debug.fake_stub_year[0])
memcpy(p, opt->debug.fake_stub_year, 4);
else
memcpy(p, UPX_VERSION_YEAR, 4);
return boff;
}
/*************************************************************************
// relocation util
**************************************************************************/

View File

@ -258,8 +258,6 @@ protected:
int patch_le16(void *b, int blen, const void * old, unsigned new_);
int patch_le32(void *b, int blen, unsigned old, unsigned new_);
int patch_le32(void *b, int blen, const void * old, unsigned new_);
int patchVersion(void *b, int blen);
int patchVersionYear(void *b, int blen);
void checkPatch(void *b, int blen, int boff, int size);
// relocation util