::pack3 to set .p_filesz; also set blocksize to allow giant scripts as input
p_lx_sh.cpp p_lx_sh.h committer: jreiser <jreiser> 1105479043 +0000
This commit is contained in:
+12
-1
@@ -104,7 +104,11 @@ bool PackLinuxI386sh::getShellName(char *buf)
|
||||
return false;
|
||||
for (int j = 0; NULL != shname[j]; ++j) {
|
||||
if (0 == strcmp(shname[j], bname + 1)) {
|
||||
return super::canPack();
|
||||
bool const s = super::canPack();
|
||||
if (s) {
|
||||
opt->o_unix.blocksize = blocksize = file_size;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -139,6 +143,13 @@ PackLinuxI386sh::pack1(OutputFile *fo, Filter &)
|
||||
generateElfHdr(fo, linux_i386sh_fold, 0x08048000);
|
||||
}
|
||||
|
||||
void
|
||||
PackLinuxI386sh::pack3(OutputFile *fo, Filter &ft)
|
||||
{
|
||||
super::pack3(fo,ft);
|
||||
elfout.phdr[0].p_filesz = fo->getBytesWritten();
|
||||
}
|
||||
|
||||
/*
|
||||
vi:ts=4:et
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user