mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
PackLinuxElf32x86::newLinker()
This commit is contained in:
parent
c5b3107f83
commit
d5e0e66426
|
@ -468,7 +468,9 @@ PackLinuxElf32x86::buildLinuxLoader(
|
|||
// PackHeader and overlay_offset at the end of the output file,
|
||||
// after the compressed data.
|
||||
|
||||
return getLoaderSize();
|
||||
unsigned const lsize = getLoaderSize();
|
||||
linker->relocate();
|
||||
return lsize;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -2013,6 +2015,11 @@ PackLinuxElf32x86::~PackLinuxElf32x86()
|
|||
{
|
||||
}
|
||||
|
||||
Linker* PackLinuxElf32x86::newLinker() const
|
||||
{
|
||||
return new ElfLinkerX86;
|
||||
}
|
||||
|
||||
PackBSDElf32x86::PackBSDElf32x86(InputFile *f) : super(f)
|
||||
{
|
||||
e_machine = Elf32_Ehdr::EM_386;
|
||||
|
|
|
@ -41,7 +41,6 @@ public:
|
|||
PackLinuxElf(InputFile *f);
|
||||
virtual ~PackLinuxElf();
|
||||
/*virtual int buildLoader(const Filter *);*/
|
||||
virtual Linker* newLinker() const;
|
||||
virtual bool canUnpackVersion(int version) const { return (version >= 11); }
|
||||
|
||||
protected:
|
||||
|
@ -55,6 +54,7 @@ protected:
|
|||
//virtual void pack3(OutputFile *, Filter &) = 0; // append loader
|
||||
virtual void pack4(OutputFile *, Filter &) = 0; // append pack header
|
||||
|
||||
virtual Linker* newLinker() const;
|
||||
virtual void generateElfHdr(
|
||||
OutputFile *,
|
||||
void const *proto,
|
||||
|
@ -287,8 +287,8 @@ protected:
|
|||
virtual void pack3(OutputFile *, Filter &); // append loader
|
||||
virtual const int *getCompressionMethods(int method, int level) const;
|
||||
virtual int buildLoader(const Filter *);
|
||||
virtual void addStubEntrySections(upx_byte const *, unsigned);
|
||||
virtual Linker* newLinker() const;
|
||||
virtual void addStubEntrySections(upx_byte const *, unsigned);
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -330,6 +330,7 @@ protected:
|
|||
virtual void pack1(OutputFile *, Filter &); // generate executable header
|
||||
|
||||
virtual int buildLoader(const Filter *);
|
||||
virtual Linker* newLinker() const;
|
||||
virtual int buildLinuxLoader(
|
||||
upx_byte const *const proto, // assembly-only sections
|
||||
unsigned const szproto,
|
||||
|
|
Loading…
Reference in New Issue
Block a user