mirror of
https://github.com/upx/upx
synced 2025-10-05 19:20:23 +08:00
Avoid some compiler warnings.
This commit is contained in:
parent
dc56c4e530
commit
e4723e0bad
|
@ -88,9 +88,9 @@ Linker* PackArmPe::newLinker() const
|
|||
// import handling
|
||||
**************************************************************************/
|
||||
|
||||
void PackArmPe::processImports(unsigned myimport, unsigned iat_off) // pass 2
|
||||
void PackArmPe::processImports2(unsigned myimport, unsigned iat_off) // pass 2
|
||||
{
|
||||
PeFile::processImports(myimport, iat_off);
|
||||
PeFile::processImports2(myimport, iat_off);
|
||||
|
||||
__packed_struct(import_desc)
|
||||
LE32 oft; // orig first thunk
|
||||
|
|
|
@ -67,7 +67,7 @@ protected:
|
|||
virtual Linker* newLinker() const;
|
||||
|
||||
virtual const char *kernelDll() const { return "coredll.dll"; }
|
||||
virtual void processImports(unsigned, unsigned);
|
||||
virtual void processImports2(unsigned, unsigned);
|
||||
virtual void addStubImports();
|
||||
|
||||
virtual void processTls(Interval *);
|
||||
|
|
|
@ -3710,7 +3710,7 @@ Elf64_Sym const *PackLinuxElf64::elf_lookup(char const *name) const
|
|||
unsigned const symbias = get_te32(&gashtab[1]);
|
||||
unsigned const n_bitmask = get_te32(&gashtab[2]);
|
||||
unsigned const gnu_shift = get_te32(&gashtab[3]);
|
||||
upx_uint64_t const *const bitmask = (upx_uint64_t const *)&gashtab[4];
|
||||
upx_uint64_t const *const bitmask = (upx_uint64_t const *)(void const *)&gashtab[4];
|
||||
unsigned const *const buckets = (unsigned const *)&bitmask[n_bitmask];
|
||||
|
||||
unsigned const h = gnu_hash(name);
|
||||
|
|
|
@ -776,7 +776,7 @@ public:
|
|||
return outputlen;
|
||||
}
|
||||
|
||||
void relocate(unsigned myimport)
|
||||
void relocate_import(unsigned myimport)
|
||||
{
|
||||
assert(nsections > 0);
|
||||
assert(output);
|
||||
|
@ -845,11 +845,11 @@ void PeFile::addStubImports()
|
|||
addKernelImport("VirtualProtect");
|
||||
}
|
||||
|
||||
void PeFile::processImports(unsigned myimport, unsigned) // pass 2
|
||||
void PeFile::processImports2(unsigned myimport, unsigned) // pass 2
|
||||
{
|
||||
COMPILE_TIME_ASSERT(sizeof(import_desc) == 20);
|
||||
|
||||
ilinker->relocate(myimport);
|
||||
ilinker->relocate_import(myimport);
|
||||
int len;
|
||||
oimpdlls = ilinker->getLoader(&len);
|
||||
assert(len == (int) soimpdlls);
|
||||
|
@ -2359,7 +2359,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh,
|
|||
if (rel_at_sections_start)
|
||||
callProcessRelocs(rel, ic);
|
||||
|
||||
processImports(ic, getProcessImportParam(upxsection));
|
||||
processImports2(ic, getProcessImportParam(upxsection));
|
||||
ODADDR(PEDIR_IMPORT) = ic;
|
||||
ODSIZE(PEDIR_IMPORT) = soimpdlls;
|
||||
ic += soimpdlls;
|
||||
|
|
|
@ -101,7 +101,7 @@ protected:
|
|||
void rebuildImports(upx_byte *& extrainfo,
|
||||
ord_mask_t ord_mask, bool set_oft);
|
||||
virtual unsigned processImports() = 0;
|
||||
virtual void processImports(unsigned, unsigned);
|
||||
virtual void processImports2(unsigned, unsigned);
|
||||
upx_byte *oimport;
|
||||
unsigned soimport;
|
||||
upx_byte *oimpdlls;
|
||||
|
|
Loading…
Reference in New Issue
Block a user