Portability updates.
committer: mfx <mfx> 1042930101 +0000
This commit is contained in:
+1
-1
@@ -257,7 +257,7 @@ void PackLinuxI386elf::pack1(OutputFile *fo, Filter &)
|
|||||||
assert(ehdri.e_phoff == sizeof(Elf_LE32_Ehdr)); // checked by canPack()
|
assert(ehdri.e_phoff == sizeof(Elf_LE32_Ehdr)); // checked by canPack()
|
||||||
sz_phdrs = ehdri.e_phnum * ehdri.e_phentsize;
|
sz_phdrs = ehdri.e_phnum * ehdri.e_phentsize;
|
||||||
|
|
||||||
phdri = new Elf_LE32_Phdr[ehdri.e_phnum];
|
phdri = new Elf_LE32_Phdr[(unsigned)ehdri.e_phnum];
|
||||||
fi->seek(ehdri.e_phoff, SEEK_SET);
|
fi->seek(ehdri.e_phoff, SEEK_SET);
|
||||||
fi->readx(phdri, sz_phdrs);
|
fi->readx(phdri, sz_phdrs);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -81,8 +81,8 @@ const int *PackLinuxI386::getFilters() const
|
|||||||
|
|
||||||
void
|
void
|
||||||
PackLinuxI386::generateElfHdr(
|
PackLinuxI386::generateElfHdr(
|
||||||
OutputFile *const fo,
|
OutputFile *fo,
|
||||||
void const *const proto,
|
void const *proto,
|
||||||
unsigned const brka
|
unsigned const brka
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
+5
-5
@@ -42,7 +42,7 @@ public:
|
|||||||
virtual void generateElfHdr(
|
virtual void generateElfHdr(
|
||||||
OutputFile *,
|
OutputFile *,
|
||||||
void const *proto,
|
void const *proto,
|
||||||
unsigned brka
|
unsigned const brka
|
||||||
);
|
);
|
||||||
virtual int getFormat() const { return UPX_F_LINUX_i386; }
|
virtual int getFormat() const { return UPX_F_LINUX_i386; }
|
||||||
virtual const char *getName() const { return "linux/386"; }
|
virtual const char *getName() const { return "linux/386"; }
|
||||||
@@ -86,25 +86,25 @@ protected:
|
|||||||
struct cprElfHdr1 {
|
struct cprElfHdr1 {
|
||||||
struct Elf_LE32_Ehdr ehdr;
|
struct Elf_LE32_Ehdr ehdr;
|
||||||
struct Elf_LE32_Phdr phdr[1];
|
struct Elf_LE32_Phdr phdr[1];
|
||||||
struct PackUnix::l_info linfo;
|
struct l_info linfo;
|
||||||
}
|
}
|
||||||
__attribute_packed;
|
__attribute_packed;
|
||||||
|
|
||||||
struct cprElfHdr2 {
|
struct cprElfHdr2 {
|
||||||
struct Elf_LE32_Ehdr ehdr;
|
struct Elf_LE32_Ehdr ehdr;
|
||||||
struct Elf_LE32_Phdr phdr[2];
|
struct Elf_LE32_Phdr phdr[2];
|
||||||
struct PackUnix::l_info linfo;
|
struct l_info linfo;
|
||||||
}
|
}
|
||||||
__attribute_packed;
|
__attribute_packed;
|
||||||
|
|
||||||
struct cprElfHdr3 {
|
struct cprElfHdr3 {
|
||||||
struct Elf_LE32_Ehdr ehdr;
|
struct Elf_LE32_Ehdr ehdr;
|
||||||
struct Elf_LE32_Phdr phdr[3];
|
struct Elf_LE32_Phdr phdr[3];
|
||||||
struct PackUnix::l_info linfo;
|
struct l_info linfo;
|
||||||
}
|
}
|
||||||
__attribute_packed;
|
__attribute_packed;
|
||||||
|
|
||||||
cprElfHdr3 elfout;
|
struct cprElfHdr3 elfout;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user