1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

move b_len from PackHeader to PackUnix

packer.h p_unix.h p_unix.cpp p_lx_elf.cpp p_lx_exc.cpp

committer: jreiser <jreiser> 981741734 +0000
This commit is contained in:
John Reiser 2001-02-09 18:02:14 +00:00
parent 451487ef80
commit e866b2231f
5 changed files with 6 additions and 7 deletions

View File

@ -194,7 +194,7 @@ void PackLinuxI386elf::packExtent(
tmp.b_cto8 = ft->cto;
}
fo->write(&tmp, sizeof(tmp));
ph.b_len += sizeof(b_info);
b_len += sizeof(b_info);
// write compressed data
if (ph.c_len < ph.u_len) {

View File

@ -344,7 +344,7 @@ PackLinuxI386::buildLinuxLoader(
// p_progid, p_filesize, p_blocksize
sizeof(p_info) +
// compressed data
ph.b_len + ph.c_len );
b_len + ph.c_len );
// entry to stub
addLoader("LEXEC000", 0);

View File

@ -181,7 +181,7 @@ void PackUnix::pack2(OutputFile *fo, Filter &ft)
blk_info.b_ftid = ph.filter;
blk_info.b_cto8 = ph.filter_cto;
fo->write(&blk_info, sizeof(blk_info));
ph.b_len += sizeof(b_info);
b_len += sizeof(b_info);
// write compressed data
if (ph.c_len < ph.u_len) {
@ -229,7 +229,7 @@ void PackUnix::pack(OutputFile *fo)
{
Filter ft(ph.level);
ft.addvalue = 0;
ph.b_len = 0;
b_len = 0;
progid = 0;
// set options

View File

@ -81,6 +81,8 @@ protected:
MemBuffer pt_dynamic;
int sz_dynamic;
unsigned b_len; // total length of b_info blocks
// must agree with stub/linux.hh
struct b_info { // 12-byte header before each compressed block
unsigned sz_unc; // uncompressed_size

View File

@ -95,9 +95,6 @@ public:
// info fields set by Packer::compressWithFilters()
unsigned overlap_overhead;
// FIXME: john, what is this ???
unsigned b_len; // total length of b_info blocks
};