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