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:
+1
-1
@@ -194,7 +194,7 @@ void PackLinuxI386elf::packExtent(
|
|||||||
tmp.b_cto8 = ft->cto;
|
tmp.b_cto8 = ft->cto;
|
||||||
}
|
}
|
||||||
fo->write(&tmp, sizeof(tmp));
|
fo->write(&tmp, sizeof(tmp));
|
||||||
ph.b_len += sizeof(b_info);
|
b_len += sizeof(b_info);
|
||||||
|
|
||||||
// write compressed data
|
// write compressed data
|
||||||
if (ph.c_len < ph.u_len) {
|
if (ph.c_len < ph.u_len) {
|
||||||
|
|||||||
+1
-1
@@ -344,7 +344,7 @@ PackLinuxI386::buildLinuxLoader(
|
|||||||
// p_progid, p_filesize, p_blocksize
|
// p_progid, p_filesize, p_blocksize
|
||||||
sizeof(p_info) +
|
sizeof(p_info) +
|
||||||
// compressed data
|
// compressed data
|
||||||
ph.b_len + ph.c_len );
|
b_len + ph.c_len );
|
||||||
// entry to stub
|
// entry to stub
|
||||||
addLoader("LEXEC000", 0);
|
addLoader("LEXEC000", 0);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -181,7 +181,7 @@ void PackUnix::pack2(OutputFile *fo, Filter &ft)
|
|||||||
blk_info.b_ftid = ph.filter;
|
blk_info.b_ftid = ph.filter;
|
||||||
blk_info.b_cto8 = ph.filter_cto;
|
blk_info.b_cto8 = ph.filter_cto;
|
||||||
fo->write(&blk_info, sizeof(blk_info));
|
fo->write(&blk_info, sizeof(blk_info));
|
||||||
ph.b_len += sizeof(b_info);
|
b_len += sizeof(b_info);
|
||||||
|
|
||||||
// write compressed data
|
// write compressed data
|
||||||
if (ph.c_len < ph.u_len) {
|
if (ph.c_len < ph.u_len) {
|
||||||
@@ -229,7 +229,7 @@ void PackUnix::pack(OutputFile *fo)
|
|||||||
{
|
{
|
||||||
Filter ft(ph.level);
|
Filter ft(ph.level);
|
||||||
ft.addvalue = 0;
|
ft.addvalue = 0;
|
||||||
ph.b_len = 0;
|
b_len = 0;
|
||||||
progid = 0;
|
progid = 0;
|
||||||
|
|
||||||
// set options
|
// set options
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ protected:
|
|||||||
MemBuffer pt_dynamic;
|
MemBuffer pt_dynamic;
|
||||||
int sz_dynamic;
|
int sz_dynamic;
|
||||||
|
|
||||||
|
unsigned b_len; // total length of b_info blocks
|
||||||
|
|
||||||
// must agree with stub/linux.hh
|
// must agree with stub/linux.hh
|
||||||
struct b_info { // 12-byte header before each compressed block
|
struct b_info { // 12-byte header before each compressed block
|
||||||
unsigned sz_unc; // uncompressed_size
|
unsigned sz_unc; // uncompressed_size
|
||||||
|
|||||||
@@ -95,9 +95,6 @@ public:
|
|||||||
|
|
||||||
// info fields set by Packer::compressWithFilters()
|
// info fields set by Packer::compressWithFilters()
|
||||||
unsigned overlap_overhead;
|
unsigned overlap_overhead;
|
||||||
|
|
||||||
// FIXME: john, what is this ???
|
|
||||||
unsigned b_len; // total length of b_info blocks
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user