Introduce ElfClass and PackVmlinuxBase for refactoring elf based packers.

This commit is contained in:
Markus F.X.J. Oberhumer
2006-12-19 00:37:35 +01:00
parent 11e863545f
commit 728e6d851e
5 changed files with 88 additions and 72 deletions
+1 -18
View File
@@ -45,16 +45,11 @@ static const
static const
#include "stub/arm-linux.kernel.vmlinux.h"
/*************************************************************************
//
**************************************************************************/
PackVmlinuxI386::PackVmlinuxI386(InputFile *f) :
super(f), n_ptload(0), phdri(NULL), shdri(NULL), shstrtab(NULL)
{
bele = &N_BELE_RTP::le_policy;
}
PackVmlinuxI386::~PackVmlinuxI386()
{
delete [] shstrtab;
@@ -115,12 +110,6 @@ PackVmlinuxI386::getElfSections()
return shstrsec;
}
PackVmlinuxARM::PackVmlinuxARM(InputFile *f) :
super(f), n_ptload(0), phdri(NULL), shdri(NULL), shstrtab(NULL)
{
bele = &N_BELE_RTP::le_policy;
}
PackVmlinuxARM::~PackVmlinuxARM()
{
delete [] shstrtab;
@@ -1254,12 +1243,6 @@ void PackVmlinuxARM::unpack(OutputFile *fo)
//
**************************************************************************/
PackVmlinuxAMD64::PackVmlinuxAMD64(InputFile *f) :
super(f), n_ptload(0), phdri(NULL), shdri(NULL), shstrtab(NULL)
{
bele = &N_BELE_RTP::le_policy;
}
PackVmlinuxAMD64::~PackVmlinuxAMD64()
{
delete [] shstrtab;