mirror of https://github.com/upx/upx.git
Fixed a Causeway compatibility problem.
committer: ml1050 <ml1050> 964557226 +0000
This commit is contained in:
parent
55b0533c80
commit
572dbee944
|
@ -98,11 +98,11 @@ protected:
|
||||||
LE32 non_resident_name_table_offset;
|
LE32 non_resident_name_table_offset;
|
||||||
LE32 non_resident_name_table_length;
|
LE32 non_resident_name_table_length;
|
||||||
// 0x90
|
// 0x90
|
||||||
#if 1
|
char _7[4]; //non_resident_names_checksum
|
||||||
char _7[52];
|
|
||||||
#else
|
|
||||||
LE32 non_resident_names_checksum;
|
|
||||||
LE32 automatic_data_object;
|
LE32 automatic_data_object;
|
||||||
|
#if 1
|
||||||
|
char _8[44];
|
||||||
|
#else
|
||||||
LE32 debug_info_offset;
|
LE32 debug_info_offset;
|
||||||
LE32 debug_info_length;
|
LE32 debug_info_length;
|
||||||
// 0xA0
|
// 0xA0
|
||||||
|
|
|
@ -192,6 +192,7 @@ void PackWcle::encodeObjectTable()
|
||||||
oh.init_eip_offset = neweip;
|
oh.init_eip_offset = neweip;
|
||||||
oh.init_ss_object = 2;
|
oh.init_ss_object = 2;
|
||||||
oh.init_esp_offset = OOT(1,virtual_size);
|
oh.init_esp_offset = OOT(1,virtual_size);
|
||||||
|
oh.automatic_data_object = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -433,6 +434,7 @@ void PackWcle::pack(OutputFile *fo)
|
||||||
const unsigned calltrickoffset = ft.cto << 24;
|
const unsigned calltrickoffset = ft.cto << 24;
|
||||||
|
|
||||||
// attach some useful data at the end of preprocessed fixups
|
// attach some useful data at the end of preprocessed fixups
|
||||||
|
ifixups[sofixups++] = ih.automatic_data_object;
|
||||||
unsigned ic = objects*sizeof(*iobject_table);
|
unsigned ic = objects*sizeof(*iobject_table);
|
||||||
memcpy(ifixups+sofixups,iobject_desc,ic);
|
memcpy(ifixups+sofixups,iobject_desc,ic);
|
||||||
iobject_desc.free();
|
iobject_desc.free();
|
||||||
|
@ -668,6 +670,8 @@ void PackWcle::decodeObjectTable()
|
||||||
|
|
||||||
const unsigned extradata = ph.version == 10 ? 17 : 13;
|
const unsigned extradata = ph.version == 10 ? 17 : 13;
|
||||||
memcpy(oobject_table,oimage + ph.u_len - extradata - ic,ic);
|
memcpy(oobject_table,oimage + ph.u_len - extradata - ic,ic);
|
||||||
|
if (ph.version >= 12)
|
||||||
|
oh.automatic_data_object = oimage[ph.u_len - ic - 14];
|
||||||
|
|
||||||
for (ic = jc = 0; ic < soobject_table; ic++)
|
for (ic = jc = 0; ic < soobject_table; ic++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,7 +38,7 @@ class PackWcle : public Packer, public LeFile
|
||||||
typedef Packer super;
|
typedef Packer super;
|
||||||
public:
|
public:
|
||||||
PackWcle(InputFile *f) : super(f), LeFile(f){};
|
PackWcle(InputFile *f) : super(f), LeFile(f){};
|
||||||
virtual int getVersion() const { return 11; }
|
virtual int getVersion() const { return 12; }
|
||||||
virtual int getFormat() const { return UPX_F_WC_LE; }
|
virtual int getFormat() const { return UPX_F_WC_LE; }
|
||||||
virtual const char *getName() const { return "watcom/le"; }
|
virtual const char *getName() const { return "watcom/le"; }
|
||||||
virtual int getCompressionMethod() const;
|
virtual int getCompressionMethod() const;
|
||||||
|
|
Loading…
Reference in New Issue