Fixed a Causeway compatibility problem.

committer: ml1050 <ml1050> 964557226 +0000
This commit is contained in:
László Molnár 2000-07-25 20:33:46 +00:00
parent 55b0533c80
commit 572dbee944
3 changed files with 9 additions and 5 deletions

View File

@ -98,11 +98,11 @@ protected:
LE32 non_resident_name_table_offset;
LE32 non_resident_name_table_length;
// 0x90
#if 1
char _7[52];
#else
LE32 non_resident_names_checksum;
char _7[4]; //non_resident_names_checksum
LE32 automatic_data_object;
#if 1
char _8[44];
#else
LE32 debug_info_offset;
LE32 debug_info_length;
// 0xA0

View File

@ -192,6 +192,7 @@ void PackWcle::encodeObjectTable()
oh.init_eip_offset = neweip;
oh.init_ss_object = 2;
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;
// attach some useful data at the end of preprocessed fixups
ifixups[sofixups++] = ih.automatic_data_object;
unsigned ic = objects*sizeof(*iobject_table);
memcpy(ifixups+sofixups,iobject_desc,ic);
iobject_desc.free();
@ -668,6 +670,8 @@ void PackWcle::decodeObjectTable()
const unsigned extradata = ph.version == 10 ? 17 : 13;
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++)
{

View File

@ -38,7 +38,7 @@ class PackWcle : public Packer, public LeFile
typedef Packer super;
public:
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 const char *getName() const { return "watcom/le"; }
virtual int getCompressionMethod() const;