1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

NetBSD version 5 requires PT_NOTE for PaX. Also adjust other *BSD and PT_NOTE.

[Tested OK on FreeBSD 8.1, NetBSD 5.1, OpenBSD 4.8.  Cleanup needed.]
This commit is contained in:
John Reiser 2010-11-16 21:13:42 -08:00
parent dfc2efe8a6
commit e6357b81eb
17 changed files with 5108 additions and 2460 deletions

View File

@ -195,6 +195,55 @@
#endif #endif
#ifdef WANT_NHDR_ENUM
#undef WANT_NHDR_ENUM
enum { // ELF PT_NOTE types
#define ELF_NOTE_GNU_NAME "GNU\0"
NT_GNU_ABI_TAG = 1,
NT_GNU_HWCAP = 2,
NT_GNU_BUILD_ID = 3,
#define ELF_NOTE_OPENBSD_NAME "OpenBSD\0"
NHDR_OPENBSD_TAG = 1,
#define ELF_NOTE_NETBSD_NAME "NetBSD\0"
NHDR_NETBSD_TAG = 1,
NHDR_CHECKSUM_TAG = 2,
NHDR_PAX_TAG = 3
};
enum { // descsz descriptor sizes
GNU_ABI_DESCSZ = 16, // int GNU_OS, major, minor, subminor;
NETBSD_DESCSZ = 4, // major_ver * (10**8) + minor
OPENBSD_DESCSZ = 4, // 32-bit zero
// CHECKSUM_DESCSZ is 2*sizeof(short) + sizeof(checksum)
PAX_DESCSZ = 4 // 32-bit mask
};
enum { // GNU OS/version
GNU_OS_LINUX = 0,
GNU_OS_HURD = 1,
GNU_OS_SOLARIS = 2
};
enum { // NetBSD checksum methods
CHECKSUM_CRC32 = 1,
CHECKSUM_MD5 = 2,
CHECKSUM_SHA1 = 3,
CHECKSUM_SHA256 = 4
};
#define ELF_NOTE_PAX_NAME "PaX\0"
enum { // NetBSD PaX bit values
PAX_MPROTECT = (1<<0), /* force enable Mprotect */
PAX_NOMPROTECT = (1<<1), /* force disable Mprotect */
PAX_GUARD = (1<<2), /* force enable SEGVguard */
PAX_NOGUARD = (1<<3), /* force disable SEGVguard */
PAX_ASLR = (1<<4), /* force enable ASLR */
PAX_NOASLR = (1<<5) /* force disable ASLR */
};
#endif
/* /*
vi:ts=4:et vi:ts=4:et
*/ */

View File

@ -181,10 +181,13 @@ void PackLinuxElf::pack3(OutputFile *fo, Filter &ft)
fo->write(&zero, 3& (0u-len)); // ALIGN_UP 0 mod 4 fo->write(&zero, 3& (0u-len)); // ALIGN_UP 0 mod 4
len += (3& (0u-len)); // 0 mod 4 len += (3& (0u-len)); // 0 mod 4
unsigned const t = 4 ^ (4 & len) ^ ((!!xct_off)<<2); // 0 or 4 unsigned const t = (4 & len) ^ ((!!xct_off)<<2); // 0 or 4
fo->write(&zero, t); fo->write(&zero, t);
len += t; len += t;
set_te32(&disp, 2*sizeof(disp) + len - (sz_elf_hdrs + sizeof(p_info) + sizeof(l_info)));
fo->write(&disp, sizeof(disp)); // .e_entry - &first_b_info
len += sizeof(disp);
set_te32(&disp, len); // distance back to beginning (detect dynamic reloc) set_te32(&disp, len); // distance back to beginning (detect dynamic reloc)
fo->write(&disp, sizeof(disp)); fo->write(&disp, sizeof(disp));
len += sizeof(disp); len += sizeof(disp);
@ -398,7 +401,7 @@ void PackLinuxElf::defineSymbols(Filter const *)
} }
PackLinuxElf32::PackLinuxElf32(InputFile *f) PackLinuxElf32::PackLinuxElf32(InputFile *f)
: super(f), phdri(NULL), pt_note(NULL), shdri(NULL), : super(f), phdri(NULL), note_body(NULL), shdri(NULL),
page_mask(~0u<<lg2_page), page_mask(~0u<<lg2_page),
dynseg(NULL), hashtab(NULL), gashtab(NULL), dynsym(NULL), dynseg(NULL), hashtab(NULL), gashtab(NULL), dynsym(NULL),
shstrtab(NULL), n_elf_shnum(0), shstrtab(NULL), n_elf_shnum(0),
@ -413,11 +416,12 @@ PackLinuxElf32::PackLinuxElf32(InputFile *f)
PackLinuxElf32::~PackLinuxElf32() PackLinuxElf32::~PackLinuxElf32()
{ {
delete[] note_body;
delete[] phdri; phdri = NULL; delete[] phdri; phdri = NULL;
} }
PackLinuxElf64::PackLinuxElf64(InputFile *f) PackLinuxElf64::PackLinuxElf64(InputFile *f)
: super(f), phdri(NULL), pt_note(NULL), shdri(NULL), : super(f), phdri(NULL), note_body(NULL), shdri(NULL),
page_mask(~0ull<<lg2_page), page_mask(~0ull<<lg2_page),
dynseg(NULL), hashtab(NULL), gashtab(NULL), dynsym(NULL), dynseg(NULL), hashtab(NULL), gashtab(NULL), dynsym(NULL),
shstrtab(NULL), n_elf_shnum(0), shstrtab(NULL), n_elf_shnum(0),
@ -432,6 +436,7 @@ PackLinuxElf64::PackLinuxElf64(InputFile *f)
PackLinuxElf64::~PackLinuxElf64() PackLinuxElf64::~PackLinuxElf64()
{ {
delete[] note_body;
delete[] phdri; phdri = NULL; delete[] phdri; phdri = NULL;
} }
@ -916,9 +921,15 @@ PackBSDElf32x86::buildLoader(const Filter *ft)
tmp, sizeof(stub_i386_bsd_elf_fold), ft); tmp, sizeof(stub_i386_bsd_elf_fold), ft);
} }
static const
#include "stub/i386-netbsd.elf-entry.h"
static const static const
#include "stub/i386-netbsd.elf-fold.h" #include "stub/i386-netbsd.elf-fold.h"
#define WANT_NHDR_ENUM
#include "p_elf_enum.h"
void void
PackNetBSDElf32x86::buildLoader(const Filter *ft) PackNetBSDElf32x86::buildLoader(const Filter *ft)
{ {
@ -938,8 +949,8 @@ PackNetBSDElf32x86::buildLoader(const Filter *ft)
} }
} }
buildLinuxLoader( buildLinuxLoader(
stub_i386_bsd_elf_entry, sizeof(stub_i386_bsd_elf_entry), stub_i386_netbsd_elf_entry, sizeof(stub_i386_netbsd_elf_entry),
tmp, sizeof(stub_i386_netbsd_elf_fold), ft); tmp, sizeof(stub_i386_netbsd_elf_fold), ft);
} }
static const static const
@ -1153,6 +1164,7 @@ bool PackLinuxElf32::canPack()
unsigned osabi0 = u.buf[Elf32_Ehdr::EI_OSABI]; unsigned osabi0 = u.buf[Elf32_Ehdr::EI_OSABI];
// The first PT_LOAD32 must cover the beginning of the file (0==p_offset). // The first PT_LOAD32 must cover the beginning of the file (0==p_offset).
Elf32_Phdr const *phdr = (Elf32_Phdr const *)(u.buf + e_phoff); Elf32_Phdr const *phdr = (Elf32_Phdr const *)(u.buf + e_phoff);
note_size = 0;
for (unsigned j=0; j < e_phnum; ++phdr, ++j) { for (unsigned j=0; j < e_phnum; ++phdr, ++j) {
if (j >= 14) if (j >= 14)
return false; return false;
@ -1166,17 +1178,30 @@ bool PackLinuxElf32::canPack()
load_va = get_te32(&phdr->p_vaddr); load_va = get_te32(&phdr->p_vaddr);
exetype = 1; exetype = 1;
} }
if (phdr->PT_NOTE == p_type) {
unsigned const x = get_te32(&phdr->p_memsz);
if ( sizeof(elfout.notes) < x // beware overflow of note_size
|| (sizeof(elfout.notes) < (note_size += x)) ) {
throwCantPack("PT_NOTEs too big; try '--force-execve'");
return false;
}
}
if (Elf32_Ehdr::ELFOSABI_NONE==osabi0 // Still seems to be generic. if (Elf32_Ehdr::ELFOSABI_NONE==osabi0 // Still seems to be generic.
&& NULL!=osabi_note && phdr->PT_NOTE == p_type) { && NULL!=osabi_note && phdr->PT_NOTE == p_type) {
struct Elf32_Note note; memset(&note, 0, sizeof(note)); struct {
struct Elf32_Nhdr nhdr;
char name[8];
unsigned body;
} note;
memset(&note, 0, sizeof(note));
fi->seek(p_offset, SEEK_SET); fi->seek(p_offset, SEEK_SET);
fi->readx(&note, sizeof(note)); fi->readx(&note, sizeof(note));
fi->seek(0, SEEK_SET); fi->seek(0, SEEK_SET);
if (4==get_te32(&note.descsz) if (4==get_te32(&note.nhdr.descsz)
&& 1==get_te32(&note.type) && 1==get_te32(&note.nhdr.type)
// && 0==note.end // && 0==note.end
&& (1+ strlen(osabi_note))==get_te32(&note.namesz) && (1+ strlen(osabi_note))==get_te32(&note.nhdr.namesz)
&& 0==strcmp(osabi_note, (char const *)note.text) && 0==strcmp(osabi_note, (char const *)&note.name[0])
) { ) {
osabi0 = ei_osabi; // Specified by PT_NOTE. osabi0 = ei_osabi; // Specified by PT_NOTE.
} }
@ -1596,6 +1621,12 @@ PackLinuxElf32::generateElfHdr(
} }
} }
static unsigned
up4(unsigned x)
{
return ~3u & (3+ x);
}
void void
PackNetBSDElf32x86::generateElfHdr( PackNetBSDElf32x86::generateElfHdr(
OutputFile *fo, OutputFile *fo,
@ -1603,62 +1634,92 @@ PackNetBSDElf32x86::generateElfHdr(
unsigned const brka unsigned const brka
) )
{ {
cprElfHdr3 *const h3 = (cprElfHdr3 *)&elfout; super::generateElfHdr(fo, proto, brka);
memcpy(h3, proto, sizeof(*h3)); // reads beyond, but OK cprElfHdr2 *const h2 = (cprElfHdr2 *)(void *)&elfout;
h3->ehdr.e_ident[Elf32_Ehdr::EI_OSABI] = ei_osabi;
assert(2==get_te16(&h3->ehdr.e_phnum));
set_te16(&h3->ehdr.e_phnum, 3);
assert(get_te32(&h3->ehdr.e_phoff) == sizeof(Elf32_Ehdr)); sz_elf_hdrs = sizeof(*h2) - sizeof(linfo);
h3->ehdr.e_shoff = 0; unsigned note_offset = sz_elf_hdrs;
assert(get_te16(&h3->ehdr.e_ehsize) == sizeof(Elf32_Ehdr));
assert(get_te16(&h3->ehdr.e_phentsize) == sizeof(Elf32_Phdr));
set_te16(&h3->ehdr.e_shentsize, sizeof(Elf32_Shdr));
h3->ehdr.e_shnum = 0;
h3->ehdr.e_shstrndx = 0;
sz_elf_hdrs = sizeof(*h3) - sizeof(linfo); // Find the NetBSD PT_NOTE and the PaX PT_NOTE.
unsigned const note_offset = sz_elf_hdrs; Elf32_Nhdr const *np_NetBSD = 0; unsigned sz_NetBSD = 0;
set_te32(&h3->phdr[0].p_filesz, sizeof(*h3)+sizeof(elfnote)); // + identsize; Elf32_Nhdr const *np_PaX = 0; unsigned sz_PaX = 0;
h3->phdr[0].p_memsz = h3->phdr[0].p_filesz; unsigned char *cp = note_body;
unsigned j;
for (j=0; j < note_size; ) {
Elf32_Nhdr const *const np = (Elf32_Nhdr const *)cp;
int k = sizeof(*np) + up4(get_te32(&np->namesz))
+ up4(get_te32(&np->descsz));
unsigned const brkb = brka | ((0==(~page_mask & brka)) ? 0x20 : 0); if (NHDR_NETBSD_TAG == np->type && 7== np->namesz
set_te32(&h3->phdr[1].p_type, PT_LOAD32); // be sure && NETBSD_DESCSZ == np->descsz
set_te32(&h3->phdr[1].p_offset, ~page_mask & brkb); && 0==strcmp(ELF_NOTE_NETBSD_NAME, (char const *)&np->body)) {
set_te32(&h3->phdr[1].p_vaddr, brkb); np_NetBSD = np;
set_te32(&h3->phdr[1].p_paddr, brkb); sz_NetBSD = k;
h3->phdr[1].p_filesz = 0; }
h3->phdr[1].p_memsz = 0; if (NHDR_PAX_TAG == np->type && 4== np->namesz
set_te32(&h3->phdr[1].p_flags, Elf32_Phdr::PF_R | Elf32_Phdr::PF_W); && PAX_DESCSZ==np->descsz
&& 0==strcmp(ELF_NOTE_PAX_NAME, (char const *)&np->body)) {
set_te32(&h3->phdr[2].p_type, Elf32_Phdr::PT_NOTE); np_PaX = np;
set_te32(&h3->phdr[2].p_offset, note_offset); sz_PaX = k;
set_te32(&h3->phdr[2].p_vaddr, note_offset); }
set_te32(&h3->phdr[2].p_paddr, note_offset); cp += k;
set_te32(&h3->phdr[2].p_filesz, sizeof(elfnote)); j += k;
set_te32(&h3->phdr[2].p_memsz, sizeof(elfnote));
set_te32(&h3->phdr[2].p_flags, Elf32_Phdr::PF_R);
set_te32(&h3->phdr[2].p_align, 4);
set_te32(&elfnote.namesz, 8);
set_te32(&elfnote.descsz, 4);
set_te32(&elfnote.type, 1);
strcpy(elfnote.text, "NetBSD");
if (pt_note) {
struct Elf32_Note oldnote;
fi->seek(get_te32(&pt_note->p_offset), SEEK_SET);
fi->readx(&oldnote, sizeof(oldnote));
elfnote.end = oldnote.end;
} }
else {
elfnote.end = 0; // Add PT_NOTE for the NetBSD note and PaX note, if any.
note_offset += (np_NetBSD ? sizeof(Elf32_Phdr) : 0);
note_offset += (np_PaX ? sizeof(Elf32_Phdr) : 0);
Elf32_Phdr *phdr = &elfout.phdr[2];
if (np_NetBSD) {
set_te32(&phdr->p_type, Elf32_Phdr::PT_NOTE);
set_te32(&phdr->p_offset, note_offset);
set_te32(&phdr->p_vaddr, note_offset);
set_te32(&phdr->p_paddr, note_offset);
set_te32(&phdr->p_filesz, sz_NetBSD);
set_te32(&phdr->p_memsz, sz_NetBSD);
set_te32(&phdr->p_flags, Elf32_Phdr::PF_R);
set_te32(&phdr->p_align, 4);
sz_elf_hdrs += sz_NetBSD + sizeof(*phdr);
note_offset += sz_NetBSD;
++phdr;
} }
if (np_PaX) {
set_te32(&phdr->p_type, Elf32_Phdr::PT_NOTE);
set_te32(&phdr->p_offset, note_offset);
set_te32(&phdr->p_vaddr, note_offset);
set_te32(&phdr->p_paddr, note_offset);
set_te32(&phdr->p_filesz, sz_PaX);
set_te32(&phdr->p_memsz, sz_PaX);
set_te32(&phdr->p_flags, Elf32_Phdr::PF_R);
set_te32(&phdr->p_align, 4);
unsigned bits = get_te32(&np_PaX->body[4]);
bits &= ~PAX_MPROTECT;
bits |= PAX_NOMPROTECT;
set_te32((unsigned *)&np_PaX->body[4], bits);
sz_elf_hdrs += sz_PaX + sizeof(*phdr);
note_offset += sz_PaX;
++phdr;
}
set_te32(&h2->phdr[0].p_filesz, note_offset);
h2->phdr[0].p_memsz = h2->phdr[0].p_filesz;
if (ph.format==getFormat()) { if (ph.format==getFormat()) {
memset(&h3->linfo, 0, sizeof(h3->linfo)); set_te16(&h2->ehdr.e_phnum, !!sz_NetBSD + !!sz_PaX +
fo->write(h3, sizeof(*h3) - sizeof(h3->linfo)); get_te16(&h2->ehdr.e_phnum));
fo->write(&elfnote, sizeof(elfnote)); fo->seek(0, SEEK_SET);
fo->write(&h3->linfo, sizeof(h3->linfo)); fo->rewrite(h2, sizeof(*h2) - sizeof(h2->linfo));
memcpy(&((char *)phdr)[0], np_NetBSD, sz_NetBSD);
memcpy(&((char *)phdr)[sz_NetBSD], np_PaX, sz_PaX);
fo->write(&elfout.phdr[2],
&((char *)phdr)[sz_PaX + sz_NetBSD] - (char *)&elfout.phdr[2]);
l_info foo; memset(&foo, 0, sizeof(foo));
fo->rewrite(&foo, sizeof(foo));
} }
else { else {
assert(false); // unknown ph.format, PackLinuxElf32 assert(false); // unknown ph.format, PackLinuxElf32
@ -1686,19 +1747,14 @@ PackOpenBSDElf32x86::generateElfHdr(
h3->ehdr.e_shnum = 0; h3->ehdr.e_shnum = 0;
h3->ehdr.e_shstrndx = 0; h3->ehdr.e_shstrndx = 0;
sz_elf_hdrs = sizeof(*h3) - sizeof(linfo); struct {
unsigned const note_offset = sz_elf_hdrs; Elf32_Nhdr nhdr;
set_te32(&h3->phdr[0].p_filesz, sizeof(*h3)+sizeof(elfnote)); // + identsize; char name[8];
h3->phdr[0].p_memsz = h3->phdr[0].p_filesz; unsigned body;
} elfnote;
unsigned const brkb = brka | ((0==(~page_mask & brka)) ? 0x20 : 0); unsigned const note_offset = sizeof(*h3) - sizeof(linfo);
set_te32(&h3->phdr[1].p_type, PT_LOAD32); // be sure sz_elf_hdrs = sizeof(elfnote) + note_offset;
set_te32(&h3->phdr[1].p_offset, ~page_mask & brkb);
set_te32(&h3->phdr[1].p_vaddr, brkb);
set_te32(&h3->phdr[1].p_paddr, brkb);
h3->phdr[1].p_filesz = 0;
h3->phdr[1].p_memsz = 0;
set_te32(&h3->phdr[1].p_flags, Elf32_Phdr::PF_R | Elf32_Phdr::PF_W);
set_te32(&h3->phdr[2].p_type, Elf32_Phdr::PT_NOTE); set_te32(&h3->phdr[2].p_type, Elf32_Phdr::PT_NOTE);
set_te32(&h3->phdr[2].p_offset, note_offset); set_te32(&h3->phdr[2].p_offset, note_offset);
@ -1709,11 +1765,24 @@ PackOpenBSDElf32x86::generateElfHdr(
set_te32(&h3->phdr[2].p_flags, Elf32_Phdr::PF_R); set_te32(&h3->phdr[2].p_flags, Elf32_Phdr::PF_R);
set_te32(&h3->phdr[2].p_align, 4); set_te32(&h3->phdr[2].p_align, 4);
set_te32(&elfnote.namesz, 8); // Q: Same as this->note_body[0 .. this->note_size-1] ?
set_te32(&elfnote.descsz, 4); set_te32(&elfnote.nhdr.namesz, 8);
set_te32(&elfnote.type, 1); set_te32(&elfnote.nhdr.descsz, OPENBSD_DESCSZ);
strcpy(elfnote.text, "OpenBSD"); set_te32(&elfnote.nhdr.type, NHDR_OPENBSD_TAG);
elfnote.end = 0; memcpy(elfnote.name, "OpenBSD", sizeof(elfnote.name));
elfnote.body = 0;
set_te32(&h3->phdr[0].p_filesz, sz_elf_hdrs);
h3->phdr[0].p_memsz = h3->phdr[0].p_filesz;
unsigned const brkb = brka | ((0==(~page_mask & brka)) ? 0x20 : 0);
set_te32(&h3->phdr[1].p_type, PT_LOAD32); // be sure
set_te32(&h3->phdr[1].p_offset, ~page_mask & brkb);
set_te32(&h3->phdr[1].p_vaddr, brkb);
set_te32(&h3->phdr[1].p_paddr, brkb);
h3->phdr[1].p_filesz = 0;
h3->phdr[1].p_memsz = 0;
set_te32(&h3->phdr[1].p_flags, Elf32_Phdr::PF_R | Elf32_Phdr::PF_W);
if (ph.format==getFormat()) { if (ph.format==getFormat()) {
memset(&h3->linfo, 0, sizeof(h3->linfo)); memset(&h3->linfo, 0, sizeof(h3->linfo));
@ -1790,12 +1859,28 @@ void PackLinuxElf32::pack1(OutputFile * /*fo*/, Filter & /*ft*/)
fi->seek(e_phoff, SEEK_SET); fi->seek(e_phoff, SEEK_SET);
fi->readx(phdri, sz_phdrs); fi->readx(phdri, sz_phdrs);
// Remember all PT_NOTE, and find lg2_page from PT_LOAD.
Elf32_Phdr const *phdr = phdri; Elf32_Phdr const *phdr = phdri;
note_size = 0;
for (unsigned j=0; j < e_phnum; ++phdr, ++j) { for (unsigned j=0; j < e_phnum; ++phdr, ++j) {
if (!pt_note && phdr->PT_NOTE32 == get_te32(&phdr->p_type)) { if (phdr->PT_NOTE32 == get_te32(&phdr->p_type)) {
pt_note = const_cast<Elf32_Phdr *>(phdr); note_size += ~3u & (3+ get_te32(&phdr->p_filesz));
} }
if (phdr->PT_LOAD32 == get_te32(&phdr->p_type)) { }
if (note_size) {
note_body = new unsigned char[note_size];
note_size = 0;
}
phdr = phdri;
for (unsigned j=0; j < e_phnum; ++phdr, ++j) {
unsigned const type = get_te32(&phdr->p_type);
if (phdr->PT_NOTE32 == type) {
unsigned const len = get_te32(&phdr->p_filesz);
fi->seek(get_te32(&phdr->p_offset), SEEK_SET);
fi->readx(&note_body[note_size], len);
note_size += ~3u & (3+ len);
}
if (phdr->PT_LOAD32 == type) {
unsigned x = get_te32(&phdr->p_align) >> lg2_page; unsigned x = get_te32(&phdr->p_align) >> lg2_page;
while (x>>=1) { while (x>>=1) {
++lg2_page; ++lg2_page;
@ -1899,11 +1984,26 @@ void PackLinuxElf64::pack1(OutputFile * /*fo*/, Filter & /*ft*/)
fi->readx(phdri, sz_phdrs); fi->readx(phdri, sz_phdrs);
Elf64_Phdr const *phdr = phdri; Elf64_Phdr const *phdr = phdri;
note_size = 0;
for (unsigned j=0; j < e_phnum; ++phdr, ++j) { for (unsigned j=0; j < e_phnum; ++phdr, ++j) {
if (!pt_note && phdr->PT_NOTE64 == get_te32(&phdr->p_type)) { if (phdr->PT_NOTE64 == get_te32(&phdr->p_type)) {
pt_note = const_cast<Elf64_Phdr *>(phdr); note_size += ~3u & (3+ get_te64(&phdr->p_filesz));
} }
if (phdr->PT_LOAD64 == get_te64(&phdr->p_type)) { }
if (note_size) {
note_body = new unsigned char[note_size];
note_size = 0;
}
phdr = phdri;
for (unsigned j=0; j < e_phnum; ++phdr, ++j) {
unsigned const type = get_te32(&phdr->p_type);
if (phdr->PT_NOTE64 == type) {
unsigned const len = get_te64(&phdr->p_filesz);
fi->seek(get_te64(&phdr->p_offset), SEEK_SET);
fi->readx(&note_body[note_size], len);
note_size += ~3u & (3+ len);
}
if (phdr->PT_LOAD64 == type) {
unsigned x = get_te64(&phdr->p_align) >> lg2_page; unsigned x = get_te64(&phdr->p_align) >> lg2_page;
while (x>>=1) { while (x>>=1) {
++lg2_page; ++lg2_page;
@ -2420,18 +2520,19 @@ void PackLinuxElf32::pack4(OutputFile *fo, Filter &ft)
fo->rewrite(phdri, e_phnum * sizeof(*phdri)); fo->rewrite(phdri, e_phnum * sizeof(*phdri));
} }
else { else {
if (Elf32_Phdr::PT_NOTE==get_te32(&elfout.phdr[2].p_type)) { unsigned const reloc = get_te32(&elfout.phdr[0].p_vaddr);
unsigned const reloc = get_te32(&elfout.phdr[0].p_vaddr); Elf32_Phdr *phdr = &elfout.phdr[2];
set_te32( &elfout.phdr[2].p_vaddr, unsigned const o_phnum = get_te16(&elfout.ehdr.e_phnum);
reloc + get_te32(&elfout.phdr[2].p_vaddr)); for (unsigned j = 2; j < o_phnum; ++j, ++phdr) {
set_te32( &elfout.phdr[2].p_paddr, if (Elf32_Phdr::PT_NOTE==get_te32(&phdr->p_type)) {
reloc + get_te32(&elfout.phdr[2].p_paddr)); set_te32( &phdr->p_vaddr,
fo->rewrite(&elfout, sz_elf_hdrs); reloc + get_te32(&phdr->p_vaddr));
fo->rewrite(&elfnote, sizeof(elfnote)); set_te32( &phdr->p_paddr,
} reloc + get_te32(&phdr->p_paddr));
else { }
fo->rewrite(&elfout, sz_elf_hdrs);
} }
fo->rewrite(&elfout, sizeof(Elf32_Phdr) * o_phnum + sizeof(Elf32_Ehdr));
fo->seek(sz_elf_hdrs, SEEK_SET); // skip over PT_NOTE bodies, if any
fo->rewrite(&linfo, sizeof(linfo)); fo->rewrite(&linfo, sizeof(linfo));
} }
} }

View File

@ -141,7 +141,8 @@ protected:
protected: protected:
Elf32_Ehdr ehdri; // from input file Elf32_Ehdr ehdri; // from input file
Elf32_Phdr *phdri; // for input file Elf32_Phdr *phdri; // for input file
Elf32_Phdr *pt_note; // PT_NOTE if any unsigned char *note_body; // concatenated contents of PT_NOTEs, if any
unsigned note_size; // total size of PT_NOTEs
Elf32_Shdr const *shdri; // from input file Elf32_Shdr const *shdri; // from input file
unsigned page_mask; // AND clears the offset-within-page unsigned page_mask; // AND clears the offset-within-page
@ -174,23 +175,30 @@ protected:
l_info linfo; l_info linfo;
__packed_struct_end() __packed_struct_end()
cprElfHdr3 elfout; __packed_struct(cprElfHdrNetBSD)
Elf32_Ehdr ehdr;
Elf32_Phdr phdr[4];
unsigned char notes[512];
__packed_struct_end()
struct Elf32_Note { cprElfHdrNetBSD elfout;
unsigned namesz; // 8
unsigned descsz; // 4 struct Elf32_Nhdr {
unsigned type; // 1 unsigned namesz;
char text[0x18 - 4*4]; // "OpenBSD" unsigned descsz;
unsigned end; // 0 unsigned type;
} elfnote; unsigned char body[0];
};
static void compileTimeAssertions() { static void compileTimeAssertions() {
COMPILE_TIME_ASSERT(sizeof(cprElfHdr1) == 52 + 1*32 + 12) COMPILE_TIME_ASSERT(sizeof(cprElfHdr1) == 52 + 1*32 + 12)
COMPILE_TIME_ASSERT(sizeof(cprElfHdr2) == 52 + 2*32 + 12) COMPILE_TIME_ASSERT(sizeof(cprElfHdr2) == 52 + 2*32 + 12)
COMPILE_TIME_ASSERT(sizeof(cprElfHdr3) == 52 + 3*32 + 12) COMPILE_TIME_ASSERT(sizeof(cprElfHdr3) == 52 + 3*32 + 12)
COMPILE_TIME_ASSERT(sizeof(cprElfHdrNetBSD) == 52 + 4*32 + 512)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr1) COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr1)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr2) COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr2)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr3) COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr3)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdrNetBSD)
} }
}; };
@ -239,7 +247,8 @@ protected:
protected: protected:
Elf64_Ehdr ehdri; // from input file Elf64_Ehdr ehdri; // from input file
Elf64_Phdr *phdri; // for input file Elf64_Phdr *phdri; // for input file
Elf64_Phdr *pt_note; // PT_NOTE if any unsigned char *note_body; // concatenated contents of PT_NOTEs, if any
unsigned note_size; // total size of PT_NOTEs
Elf64_Shdr const *shdri; // from input file Elf64_Shdr const *shdri; // from input file
acc_uint64l_t page_mask; // AND clears the offset-within-page acc_uint64l_t page_mask; // AND clears the offset-within-page
@ -272,15 +281,23 @@ protected:
l_info linfo; l_info linfo;
__packed_struct_end() __packed_struct_end()
cprElfHdr3 elfout; __packed_struct(cprElfHdr4)
Elf64_Ehdr ehdr;
Elf64_Phdr phdr[4];
l_info linfo;
__packed_struct_end()
cprElfHdr4 elfout;
static void compileTimeAssertions() { static void compileTimeAssertions() {
COMPILE_TIME_ASSERT(sizeof(cprElfHdr1) == 64 + 1*56 + 12) COMPILE_TIME_ASSERT(sizeof(cprElfHdr1) == 64 + 1*56 + 12)
COMPILE_TIME_ASSERT(sizeof(cprElfHdr2) == 64 + 2*56 + 12) COMPILE_TIME_ASSERT(sizeof(cprElfHdr2) == 64 + 2*56 + 12)
COMPILE_TIME_ASSERT(sizeof(cprElfHdr3) == 64 + 3*56 + 12) COMPILE_TIME_ASSERT(sizeof(cprElfHdr3) == 64 + 3*56 + 12)
COMPILE_TIME_ASSERT(sizeof(cprElfHdr4) == 64 + 4*56 + 12)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr1) COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr1)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr2) COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr2)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr3) COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr3)
COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr4)
} }
}; };
@ -408,12 +425,13 @@ public:
virtual const char *getFullName(const options_t *) const { return "i386-freebsd.elf"; } virtual const char *getFullName(const options_t *) const { return "i386-freebsd.elf"; }
}; };
class PackNetBSDElf32x86 : public PackBSDElf32x86 class PackNetBSDElf32x86 : public PackLinuxElf32x86
{ {
typedef PackBSDElf32x86 super; typedef PackLinuxElf32x86 super;
public: public:
PackNetBSDElf32x86(InputFile *f); PackNetBSDElf32x86(InputFile *f);
virtual ~PackNetBSDElf32x86(); virtual ~PackNetBSDElf32x86();
virtual const char *getName() const { return "netbsd/elf386"; }
virtual const char *getFullName(const options_t *) const { return "i386-netbsd.elf"; } virtual const char *getFullName(const options_t *) const { return "i386-netbsd.elf"; }
protected: protected:
virtual void buildLoader(const Filter *ft); virtual void buildLoader(const Filter *ft);
@ -430,6 +448,7 @@ class PackOpenBSDElf32x86 : public PackBSDElf32x86
public: public:
PackOpenBSDElf32x86(InputFile *f); PackOpenBSDElf32x86(InputFile *f);
virtual ~PackOpenBSDElf32x86(); virtual ~PackOpenBSDElf32x86();
virtual const char *getName() const { return "opnbsd/elf386"; }
virtual const char *getFullName(const options_t *) const { return "i386-openbsd.elf"; } virtual const char *getFullName(const options_t *) const { return "i386-openbsd.elf"; }
protected: protected:

View File

@ -114,7 +114,7 @@ void PackLinuxElf32x86interp::pack1(OutputFile *fo, Filter &)
h3.phdr[2].p_align = 1; h3.phdr[2].p_align = 1;
if (opt->o_unix.make_ptinterp) { // unusual "once per release" if (opt->o_unix.make_ptinterp) { // unusual "once per release"
elfout = h3; *(cprElfHdr3 *)&elfout = h3;
elfout.ehdr.e_phnum = 1; elfout.ehdr.e_phnum = 1;
fo->write(&elfout, elfout.ehdr.e_ehsize + elfout.ehdr.e_phentsize); fo->write(&elfout, elfout.ehdr.e_ehsize + elfout.ehdr.e_phentsize);
} }

View File

@ -85,6 +85,7 @@ STUBS += i386-darwin.dylib-entry.h
# STUBS += i386-darwin.dylib-fold.h # STUBS += i386-darwin.dylib-fold.h
STUBS += i386-darwin.macho-entry.h STUBS += i386-darwin.macho-entry.h
STUBS += i386-darwin.macho-fold.h STUBS += i386-darwin.macho-fold.h
STUBS += i386-netbsd.elf-entry.h
STUBS += i386-netbsd.elf-fold.h STUBS += i386-netbsd.elf-fold.h
STUBS += i386-openbsd.elf-fold.h STUBS += i386-openbsd.elf-fold.h
STUBS += i386-dos32.djgpp2.h STUBS += i386-dos32.djgpp2.h
@ -682,8 +683,13 @@ tmp/i386-bsd.elf-main.o : $(srcdir)/src/$$T.c
i386-netbsd.elf%.h : tc_list = i386-linux.elf arch-i386 default i386-netbsd.elf%.h : tc_list = i386-linux.elf arch-i386 default
i386-netbsd.elf%.h : tc_bfdname = elf32-i386 i386-netbsd.elf%.h : tc_bfdname = elf32-i386
# NetBSD uses the OpenBSD fold.o (for PT_NOTE handling), but the plain BSD entry.o and main.o i386-netbsd.elf-entry.h : $(srcdir)/src/$$T.S
i386-netbsd.elf-fold.h : tmp/i386-openbsd.elf-fold.o tmp/i386-bsd.elf-main.o tmp/i386-bsd.syscall.o $(srcdir)/src/i386-bsd.elf-fold.lds $(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.bin
$(call tc,f-embed_objinfo,tmp/$T.bin)
$(call tc,bin2h) tmp/$T.bin $@
# NetBSD uses the plain BSD fold.o and the plain BSD entry.o and main.o
i386-netbsd.elf-fold.h : tmp/i386-bsd.elf-fold.o tmp/i386-bsd.elf-main.o tmp/i386-bsd.syscall.o $(srcdir)/src/i386-bsd.elf-fold.lds
$(call tc,ld) --strip-all -T $(srcdir)/src/i386-bsd.elf-fold.lds -Map tmp/$T.map $(filter %.o,$^) -o tmp/$T.bin $(call tc,ld) --strip-all -T $(srcdir)/src/i386-bsd.elf-fold.lds -Map tmp/$T.map $(filter %.o,$^) -o tmp/$T.bin
$(call tc,f-objstrip,tmp/$T.bin) $(call tc,f-objstrip,tmp/$T.bin)
$(call tc,sstrip) tmp/$T.bin $(call tc,sstrip) tmp/$T.bin

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* i386-bsd.elf-fold.h /* i386-bsd.elf-fold.h
created from i386-bsd.elf-fold.bin, 1805 (0x70d) bytes created from i386-bsd.elf-fold.bin, 1801 (0x709) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@ -31,122 +31,122 @@
*/ */
#define STUB_I386_BSD_ELF_FOLD_SIZE 1805 #define STUB_I386_BSD_ELF_FOLD_SIZE 1801
#define STUB_I386_BSD_ELF_FOLD_ADLER32 0x98f4060d #define STUB_I386_BSD_ELF_FOLD_ADLER32 0x395a064b
#define STUB_I386_BSD_ELF_FOLD_CRC32 0xb1990cc8 #define STUB_I386_BSD_ELF_FOLD_CRC32 0x12e025fc
unsigned char stub_i386_bsd_elf_fold[1805] = { unsigned char stub_i386_bsd_elf_fold[1801] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0, /* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0, /* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0,
/* 0x0040 */ 0, 16,192, 0, 13, 7, 0, 0, 16, 7, 0, 0, 5, 0, 0, 0, /* 0x0040 */ 0, 16,192, 0, 9, 7, 0, 0, 12, 7, 0, 0, 5, 0, 0, 0,
/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0, 13, 7, 0, 0, 0, 0, 0, 0, /* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0,
/* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 41,201,186,248, 2, 0, 0,137,230,137,231,232,137, 0, 0, 0, /* 0x0080 */ 41,201,186,248, 2, 0, 0,137,230,137,231,232,134, 0, 0, 0,
/* 0x0090 */ 137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137, /* 0x0090 */ 137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137,
/* 0x00a0 */ 231,232,115, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72, /* 0x00a0 */ 231,232,112, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72,
/* 0x00b0 */ 141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192, /* 0x00b0 */ 141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192,
/* 0x00c0 */ 102,131,123, 16, 3,117, 1,146, 80,139,115, 24,141,131,140, 0, /* 0x00c0 */ 102,131,123, 16, 3,117, 1,146, 80,139, 67, 24,139,112,248, 41,
/* 0x00d0 */ 0, 0, 41,198,139, 24,139, 72, 4,131,193, 12,141, 84, 36, 12, /* 0x00d0 */ 240,139, 24,139, 72, 4,131,193, 12,141, 84, 36, 12, 96, 71,232,
/* 0x00e0 */ 96, 71,232,129, 4, 0, 0,131,196, 36, 89, 91,129,196, 0, 10, /* 0x00e0 */ 128, 4, 0, 0,131,196, 36, 89, 91,129,196, 0, 10, 0, 0, 90,
/* 0x00f0 */ 0, 0, 90,193,226, 12, 1,211, 80,106, 0,137,229, 41,217, 41, /* 0x00f0 */ 193,226, 12, 1,211, 80,106, 0,137,229, 41,217, 41,192, 81, 83,
/* 0x0100 */ 192, 81, 83, 80, 79, 60,175,175,117,252,255, 55, 49,255, 49,246, /* 0x0100 */ 80, 79, 60,175,175,117,252,255, 55, 49,255, 49,246, 49,210, 49,
/* 0x0110 */ 49,210, 49,201, 49,219,176, 73,195,173,171,173,171,133,192,117, /* 0x0110 */ 201, 49,219,176, 73,195,173,171,173,171,133,192,117,250,173,171,
/* 0x0120 */ 250,173,171,133,192,117,250, 87,173,171,131,248, 32,115, 3, 15, /* 0x0120 */ 133,192,117,250, 87,173,171,131,248, 32,115, 3, 15,179,194,133,
/* 0x0130 */ 179,194,133,192,173,171,117,240,131,239, 8, 1,201, 64,243,171, /* 0x0130 */ 192,173,171,117,240,131,239, 8, 1,201, 64,243,171, 72,171,171,
/* 0x0140 */ 72,171,171, 95,195, 0, 0, 0, 85,137,229, 87, 86,137,206, 83, /* 0x0140 */ 95,195, 0, 0, 85,137,229, 87, 86,137,206, 83,137,195, 57, 8,
/* 0x0150 */ 137,195, 57, 8,139,120, 4,115, 7,106,127,232,101, 5, 0, 0, /* 0x0150 */ 139,120, 4,115, 7,106,127,232,101, 5, 0, 0,133,201,116, 8,
/* 0x0160 */ 133,201,116, 8,138, 7, 71,136, 2, 66,226,248, 1,115, 4, 41, /* 0x0160 */ 138, 7, 71,136, 2, 66,226,248, 1,115, 4, 41, 51,141,101,244,
/* 0x0170 */ 51,141,101,244, 91, 94, 95,201,195, 85,137,229, 87, 86,137,198, /* 0x0170 */ 91, 94, 95,201,195, 85,137,229, 87, 86,137,198, 83,137,211,131,
/* 0x0180 */ 83,137,211,131,236, 24,139, 69, 8,139,125, 12,137, 69,220,131, /* 0x0180 */ 236, 24,139, 69, 8,139,125, 12,137, 69,220,131, 58, 0, 15,132,
/* 0x0190 */ 58, 0, 15,132,182, 0, 0, 0,141, 85,228,185, 12, 0, 0, 0, /* 0x0190 */ 182, 0, 0, 0,141, 85,228,185, 12, 0, 0, 0,137,240,232,161,
/* 0x01a0 */ 137,240,232,161,255,255,255,139, 69,228,139, 77,232,133,192,117, /* 0x01a0 */ 255,255,255,139, 69,228,139, 77,232,133,192,117, 19,129,249, 85,
/* 0x01b0 */ 19,129,249, 85, 80, 88, 33,117, 15,131, 62, 0, 15,132,140, 0, /* 0x01b0 */ 80, 88, 33,117, 15,131, 62, 0, 15,132,140, 0, 0, 0,235, 4,
/* 0x01c0 */ 0, 0,235, 4,133,201,117, 7,106,127,232,246, 4, 0, 0, 57, /* 0x01c0 */ 133,201,117, 7,106,127,232,246, 4, 0, 0, 57,193,119,245, 59,
/* 0x01d0 */ 193,119,245, 59, 3,119,241, 57,193,115, 86,137, 69,224,141, 69, /* 0x01d0 */ 3,119,241, 57,193,115, 86,137, 69,224,141, 69,224,255,117,236,
/* 0x01e0 */ 224,255,117,236, 80,255,115, 4, 81,255,118, 4,255, 85,220,131, /* 0x01e0 */ 80,255,115, 4, 81,255,118, 4,255, 85,220,131,196, 20,133,192,
/* 0x01f0 */ 196, 20,133,192,117,210,139, 85,224, 59, 85,228,117,202,138, 69, /* 0x01f0 */ 117,210,139, 85,224, 59, 85,228,117,202,138, 69,237,132,192,116,
/* 0x0200 */ 237,132,192,116, 34,133,255,116, 30,129,250, 0, 2, 0, 0,119, /* 0x0200 */ 34,133,255,116, 30,129,250, 0, 2, 0, 0,119, 4, 57, 19,117,
/* 0x0210 */ 4, 57, 19,117, 18, 15,182,192, 80, 15,182, 69,238, 80, 82,255, /* 0x0210 */ 18, 15,182,192, 80, 15,182, 69,238, 80, 82,255,115, 4,255,215,
/* 0x0220 */ 115, 4,255,215,131,196, 16,139, 69,232, 1, 70, 4, 41, 6,235, /* 0x0220 */ 131,196, 16,139, 69,232, 1, 70, 4, 41, 6,235, 10,139, 83, 4,
/* 0x0230 */ 10,139, 83, 4,137,240,232, 13,255,255,255,139, 85,228,139, 3, /* 0x0230 */ 137,240,232, 13,255,255,255,139, 85,228,139, 3, 1, 83, 4, 41,
/* 0x0240 */ 1, 83, 4, 41,208,133,192,137, 3,233, 68,255,255,255,141,101, /* 0x0240 */ 208,133,192,137, 3,233, 68,255,255,255,141,101,244, 91, 94, 95,
/* 0x0250 */ 244, 91, 94, 95,201,195,133,192, 83,137,211,116, 29,168, 1,117, /* 0x0250 */ 201,195,133,192, 83,137,211,116, 29,168, 1,117, 25,139, 16, 57,
/* 0x0260 */ 25,139, 16, 57,218,116, 7, 74,117, 11,133,219,116, 7,137, 24, /* 0x0260 */ 218,116, 7, 74,117, 11,133,219,116, 7,137, 24,137, 72, 4,235,
/* 0x0270 */ 137, 72, 4,235, 5,131,192, 8,235,231, 91,195, 85,137,229, 87, /* 0x0270 */ 5,131,192, 8,235,231, 91,195, 85,137,229, 87, 86, 83,131,236,
/* 0x0280 */ 86, 83,131,236, 60,137, 69,228,139, 69, 8,137, 85,224,139,125, /* 0x0280 */ 60,137, 69,228,139, 69, 8,137, 85,224,139,125,224,199, 69,204,
/* 0x0290 */ 224,199, 69,204,255,255,255,255,139, 85, 12,137, 69,220,139, 69, /* 0x0290 */ 255,255,255,255,139, 85, 12,137, 69,220,139, 69,224,139, 77, 20,
/* 0x02a0 */ 224,139, 77, 20,137, 85,216, 3,127, 28,139, 85,224,137, 77,212, /* 0x02a0 */ 137, 85,216, 3,127, 28,139, 85,224,137, 77,212,102,131,120, 16,
/* 0x02b0 */ 102,131,120, 16, 2, 15,183, 74, 44,137,251, 15,148,192, 49,246, /* 0x02b0 */ 2, 15,183, 74, 44,137,251, 15,148,192, 49,246, 15,182,192,137,
/* 0x02c0 */ 15,182,192,137,202,193,224, 4, 5, 2, 16, 0, 0, 74,120, 30, /* 0x02c0 */ 202,193,224, 4, 5, 2, 16, 0, 0, 74,120, 30,131, 59, 1,117,
/* 0x02d0 */ 131, 59, 1,117, 20,139, 83, 8, 59, 85,204,115, 3,137, 85,204, /* 0x02d0 */ 20,139, 83, 8, 59, 85,204,115, 3,137, 85,204, 3, 83, 20, 57,
/* 0x02e0 */ 3, 83, 20, 57,214,115, 2,137,214,131,195, 32,226,226,139, 93, /* 0x02e0 */ 214,115, 2,137,214,131,195, 32,226,226,139, 93,204,106, 0,106,
/* 0x02f0 */ 204,106, 0,106,255,129,227, 0,240,255,255, 80, 41,222,106, 0, /* 0x02f0 */ 255,129,227, 0,240,255,255, 80, 41,222,106, 0,129,198,255, 15,
/* 0x0300 */ 129,198,255, 15, 0, 0,129,230, 0,240,255,255, 86, 83,232,141, /* 0x0300 */ 0, 0,129,230, 0,240,255,255, 86, 83,232,141, 3, 0, 0,139,
/* 0x0310 */ 3, 0, 0,139, 77,224,141, 52, 48,131,196, 24, 41,216,102,131, /* 0x0310 */ 77,224,141, 52, 48,131,196, 24, 41,216,102,131,121, 44, 0,137,
/* 0x0320 */ 121, 44, 0,137,117,240,137, 69,208,199, 69,200, 0, 0, 0, 0, /* 0x0320 */ 117,240,137, 69,208,199, 69,200, 0, 0, 0, 0, 15,132,232, 1,
/* 0x0330 */ 15,132,232, 1, 0, 0,139, 7,131,248, 6,117, 34,131,125,220, /* 0x0330 */ 0, 0,139, 7,131,248, 6,117, 34,131,125,220, 0, 15,132,193,
/* 0x0340 */ 0, 15,132,193, 1, 0, 0,139, 77,208,186, 3, 0, 0, 0, 3, /* 0x0340 */ 1, 0, 0,139, 77,208,186, 3, 0, 0, 0, 3, 79, 8,139, 69,
/* 0x0350 */ 79, 8,139, 69,216,232,252,254,255,255,233,169, 1, 0, 0, 72, /* 0x0350 */ 216,232,252,254,255,255,233,169, 1, 0, 0, 72, 15,133,162, 1,
/* 0x0360 */ 15,133,162, 1, 0, 0,139, 79, 24,199, 69,196, 64, 98, 81,115, /* 0x0360 */ 0, 0,139, 79, 24,199, 69,196, 64, 98, 81,115,139, 69,208,131,
/* 0x0370 */ 139, 69,208,131,225, 7, 3, 71, 8,193,225, 2,139, 87, 16,211, /* 0x0370 */ 225, 7, 3, 71, 8,193,225, 2,139, 87, 16,211,109,196,139, 79,
/* 0x0380 */ 109,196,139, 79, 20,137,198,131,101,196, 7, 1,193,137, 85,232, /* 0x0380 */ 20,137,198,131,101,196, 7, 1,193,137, 85,232,137, 77,188,137,
/* 0x0390 */ 137, 77,188,137,193,129,225,255, 15, 0, 0,137, 69,236, 1,202, /* 0x0390 */ 193,129,225,255, 15, 0, 0,137, 69,236, 1,202, 41,206,131,125,
/* 0x03a0 */ 41,206,131,125,220, 0,137, 85,192,116, 41,106, 0,139, 69,196, /* 0x03a0 */ 220, 0,137, 85,192,116, 41,106, 0,139, 69,196,106,255,104, 18,
/* 0x03b0 */ 106,255,104, 18, 16, 0, 0,131,200, 2, 80,137,208,131,192, 3, /* 0x03b0 */ 16, 0, 0,131,200, 2, 80,137,208,131,192, 3, 80, 86,232,217,
/* 0x03c0 */ 80, 86,232,217, 2, 0, 0,131,196, 24, 57,198, 15,133,225, 0, /* 0x03c0 */ 2, 0, 0,131,196, 24, 57,198, 15,133,225, 0, 0, 0,235, 36,
/* 0x03d0 */ 0, 0,235, 36,139, 71, 4, 41,200, 80,255,117,228,106, 18,255, /* 0x03d0 */ 139, 71, 4, 41,200, 80,255,117,228,106, 18,255,117,196,255,117,
/* 0x03e0 */ 117,196,255,117,192, 86,232,181, 2, 0, 0,131,196, 24, 57,198, /* 0x03e0 */ 192, 86,232,181, 2, 0, 0,131,196, 24, 57,198, 15,133,189, 0,
/* 0x03f0 */ 15,133,189, 0, 0, 0,235, 34,131,125,220, 0,116, 28,246, 69, /* 0x03f0 */ 0, 0,235, 34,131,125,220, 0,116, 28,246, 69,196, 4,139, 69,
/* 0x0400 */ 196, 4,139, 69,212,117, 2, 49,192, 80,139, 69,220,255,117,228, /* 0x0400 */ 212,117, 2, 49,192, 80,139, 69,220,255,117,228,141, 85,232,232,
/* 0x0410 */ 141, 85,232,232, 97,253,255,255, 88, 90,139, 69,192,247,216, 37, /* 0x0410 */ 97,253,255,255, 88, 90,139, 69,192,247,216, 37,255, 15, 0, 0,
/* 0x0420 */ 255, 15, 0, 0,246, 69,196, 2,137, 69,184,116, 21,131,125,184, /* 0x0420 */ 246, 69,196, 2,137, 69,184,116, 21,131,125,184, 0,139, 85,192,
/* 0x0430 */ 0,139, 85,192,141, 4, 22,116, 9,139, 77,184,198, 0, 0, 64, /* 0x0430 */ 141, 4, 22,116, 9,139, 77,184,198, 0, 0, 64,226,250,131,125,
/* 0x0440 */ 226,250,131,125,220, 0,116,114,131, 63, 1,117, 83,246, 71, 24, /* 0x0440 */ 220, 0,116,114,131, 63, 1,117, 83,246, 71, 24, 1,116, 77,139,
/* 0x0450 */ 1,116, 77,139, 87, 20,139, 95, 8,141, 12, 26, 3, 77,208, 59, /* 0x0450 */ 87, 20,139, 95, 8,141, 12, 26, 3, 77,208, 59, 87, 16,117, 14,
/* 0x0460 */ 87, 16,117, 14,137,200,247,216, 37,255, 15, 0, 0,131,248, 3, /* 0x0460 */ 137,200,247,216, 37,255, 15, 0, 0,131,248, 3,119, 14,107, 69,
/* 0x0470 */ 119, 14,107, 69,208, 52,131,127, 4, 0,141, 76, 3, 12,117, 15, /* 0x0470 */ 208, 52,131,127, 4, 0,141, 76, 3, 12,117, 15,139, 1, 61,205,
/* 0x0480 */ 139, 1, 61,205,128,201,195,116, 6,199, 1,205,128,201,195,133, /* 0x0480 */ 128,201,195,116, 6,199, 1,205,128,201,195,133,201,116, 13,139,
/* 0x0490 */ 201,116, 13,139, 69,216, 49,210,131,224,254,232,182,253,255,255, /* 0x0490 */ 69,216, 49,210,131,224,254,232,182,253,255,255,255,117,196,255,
/* 0x04a0 */ 255,117,196,255,117,192, 86,232, 53, 2, 0, 0,131,196, 12,133, /* 0x04a0 */ 117,192, 86,232, 53, 2, 0, 0,131,196, 12,133,192,116, 7,106,
/* 0x04b0 */ 192,116, 7,106,127,232, 11, 2, 0, 0,139, 69,192, 3, 69,184, /* 0x04b0 */ 127,232, 11, 2, 0, 0,139, 69,192, 3, 69,184,141, 28, 6, 59,
/* 0x04c0 */ 141, 28, 6, 59, 93,188,115, 33,106, 0,106,255,104, 18, 16, 0, /* 0x04c0 */ 93,188,115, 33,106, 0,106,255,104, 18, 16, 0, 0,255,117,196,
/* 0x04d0 */ 0,255,117,196, 41, 93,188,255,117,188, 83,232,192, 1, 0, 0, /* 0x04d0 */ 41, 93,188,255,117,188, 83,232,192, 1, 0, 0,131,196, 24, 57,
/* 0x04e0 */ 131,196, 24, 57,195,116, 33,235,202,131,125,220, 0,116, 25,139, /* 0x04e0 */ 195,116, 33,235,202,131,125,220, 0,116, 25,139, 69,192,131,192,
/* 0x04f0 */ 69,192,131,192, 3, 37,255, 15, 0, 0,131,248, 3,119, 9, 80, /* 0x04f0 */ 3, 37,255, 15, 0, 0,131,248, 3,119, 9, 80, 83,232,215, 1,
/* 0x0500 */ 83,232,215, 1, 0, 0, 89, 91,139, 77,224,131,199, 32,255, 69, /* 0x0500 */ 0, 0, 89, 91,139, 77,224,131,199, 32,255, 69,200, 15,183, 65,
/* 0x0510 */ 200, 15,183, 65, 44, 57, 69,200, 15,140, 24,254,255,255,131,125, /* 0x0510 */ 44, 57, 69,200, 15,140, 24,254,255,255,131,125,220, 0,117, 15,
/* 0x0520 */ 220, 0,117, 15,255,117,228,232,173, 1, 0, 0, 90,133,192,116, /* 0x0520 */ 255,117,228,232,173, 1, 0, 0, 90,133,192,116, 21,235,128,139,
/* 0x0530 */ 21,235,128,139, 69,224,102,131,120, 16, 3,116, 9,255,117,240, /* 0x0530 */ 69,224,102,131,120, 16, 3,116, 9,255,117,240,232,127, 1, 0,
/* 0x0540 */ 232,127, 1, 0, 0, 88,131,125, 16, 0,116, 8,139, 77,208,139, /* 0x0540 */ 0, 88,131,125, 16, 0,116, 8,139, 77,208,139, 85, 16,137, 10,
/* 0x0550 */ 85, 16,137, 10,139, 69,224,139, 64, 24, 1, 69,208,139, 69,208, /* 0x0550 */ 139, 69,224,139, 64, 24, 1, 69,208,139, 69,208,141,101,244, 91,
/* 0x0560 */ 141,101,244, 91, 94, 95,201,195, 85,137,229, 87, 86, 83,131,236, /* 0x0560 */ 94, 95,201,195, 85,137,229, 87, 86, 83,131,236, 16,141, 85, 24,
/* 0x0570 */ 16,141, 85, 24,139, 69, 8,106, 0,139,125, 28,137, 69,236,139, /* 0x0570 */ 139, 69, 8,106, 0,139,125, 28,137, 69,236,139, 69, 16,139, 93,
/* 0x0580 */ 69, 16,139, 93, 32,141,119, 52,137, 69,232,131,192, 2,255,117, /* 0x0580 */ 32,141,119, 52,137, 69,232,131,192, 2,255,117,232,137, 69,228,
/* 0x0590 */ 232,137, 69,228,141, 69, 32,232,221,251,255,255,139, 69, 12,185, /* 0x0590 */ 141, 69, 32,232,221,251,255,255,139, 69, 12,185, 0, 16, 0, 0,
/* 0x05a0 */ 0, 16, 0, 0,186, 6, 0, 0, 0,137, 69, 32,139, 69,236, 41, /* 0x05a0 */ 186, 6, 0, 0, 0,137, 69, 32,139, 69,236, 41, 93, 36,232,159,
/* 0x05b0 */ 93, 36,232,159,252,255,255, 15,183, 79, 44,139, 69,236,186, 5, /* 0x05b0 */ 252,255,255, 15,183, 79, 44,139, 69,236,186, 5, 0, 0, 0,232,
/* 0x05c0 */ 0, 0, 0,232,142,252,255,255, 15,183, 79, 42,139, 69,236,186, /* 0x05c0 */ 142,252,255,255, 15,183, 79, 42,139, 69,236,186, 4, 0, 0, 0,
/* 0x05d0 */ 4, 0, 0, 0,232,125,252,255,255,139, 77, 40, 3, 78, 8,186, /* 0x05d0 */ 232,125,252,255,255,139, 77, 40, 3, 78, 8,186, 3, 0, 0, 0,
/* 0x05e0 */ 3, 0, 0, 0,139, 69,236,131,193, 52,232,103,252,255,255,141, /* 0x05e0 */ 139, 69,236,131,193, 52,232,103,252,255,255,141, 69,240,255,117,
/* 0x05f0 */ 69,240,255,117,228,137,250, 80,141, 69, 32,255,117,236, 80,139, /* 0x05f0 */ 228,137,250, 80,141, 69, 32,255,117,236, 80,139, 69,232,232,117,
/* 0x0600 */ 69,232,232,117,252,255,255,186, 9, 0, 0, 0,137,193,137,195, /* 0x0600 */ 252,255,255,186, 9, 0, 0, 0,137,193,137,195,139, 69,236,232,
/* 0x0610 */ 139, 69,236,232, 62,252,255,255,102,139, 79, 44,131,196, 24, 49, /* 0x0610 */ 62,252,255,255,102,139, 79, 44,131,196, 24, 49,210,102,133,201,
/* 0x0620 */ 210,102,133,201,116,112,131, 62, 3,117, 96,106, 0,139, 69,240, /* 0x0620 */ 116,112,131, 62, 3,117, 96,106, 0,139, 69,240,106, 0, 3, 70,
/* 0x0630 */ 106, 0, 3, 70, 8, 80,232,154, 0, 0, 0,131,196, 12,133,192, /* 0x0630 */ 8, 80,232,154, 0, 0, 0,131,196, 12,133,192,137,195,120, 22,
/* 0x0640 */ 137,195,120, 22,104, 0, 2, 0, 0, 87, 80,232,125, 0, 0, 0, /* 0x0640 */ 104, 0, 2, 0, 0, 87, 80,232,125, 0, 0, 0,131,196, 12, 61,
/* 0x0650 */ 131,196, 12, 61, 0, 2, 0, 0,116, 7,106,127,232,100, 0, 0, /* 0x0650 */ 0, 2, 0, 0,116, 7,106,127,232,100, 0, 0, 0,141, 69,240,
/* 0x0660 */ 0,141, 69,240,137,250,106, 0, 80,137,216,106, 0,106, 0,232, /* 0x0660 */ 137,250,106, 0, 80,137,216,106, 0,106, 0,232, 8,252,255,255,
/* 0x0670 */ 8,252,255,255,139, 77,240,137,195,139, 69,236,186, 7, 0, 0, /* 0x0670 */ 139, 77,240,137,195,139, 69,236,186, 7, 0, 0, 0,232,208,251,
/* 0x0680 */ 0,232,208,251,255,255,131,196, 16,235, 11, 66, 15,183,193,131, /* 0x0680 */ 255,255,131,196, 16,235, 11, 66, 15,183,193,131,198, 32, 57,194,
/* 0x0690 */ 198, 32, 57,194,124,144,141,101,244,137,216, 91, 94, 95,201,195, /* 0x0690 */ 124,144,141,101,244,137,216, 91, 94, 95,201,195, 85,137,229, 49,
/* 0x06a0 */ 85,137,229, 49,192, 80,255,117, 28, 80,255,117, 24,255,117, 20, /* 0x06a0 */ 192, 80,255,117, 28, 80,255,117, 24,255,117, 20,255,117, 16,255,
/* 0x06b0 */ 255,117, 16,255,117, 12,255,117, 8, 80,176,197, 80, 80,176,198, /* 0x06b0 */ 117, 12,255,117, 8, 80,176,197, 80, 80,176,198,205,128,201,195,
/* 0x06c0 */ 205,128,201,195,195,176, 1, 15,182,192,205,128,195,176, 3,235, /* 0x06c0 */ 195,176, 1, 15,182,192,205,128,195,176, 3,235,246,176, 4,235,
/* 0x06d0 */ 246,176, 4,235,242,176, 5,235,238,176, 6,235,234,176, 73,235, /* 0x06d0 */ 242,176, 5,235,238,176, 6,235,234,176, 73,235,230,176, 74,235,
/* 0x06e0 */ 230,176, 74,235,226,176, 33,235,222,176, 20,235,218,176, 92,235, /* 0x06e0 */ 226,176, 33,235,222,176, 20,235,218,176, 92,235,214,176, 59,235,
/* 0x06f0 */ 214,176, 59,235,210,176, 2,235,206,176,130,235,202,176,116,235, /* 0x06f0 */ 210,176, 2,235,206,176,130,235,202,176,116,235,198,176,240,235,
/* 0x0700 */ 198,176,240,235,194,176, 10,235,190,176, 7,235,186 /* 0x0700 */ 194,176, 10,235,190,176, 7,235,186
}; };

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* i386-netbsd.elf-fold.h /* i386-netbsd.elf-fold.h
created from i386-netbsd.elf-fold.bin, 1809 (0x711) bytes created from i386-netbsd.elf-fold.bin, 1801 (0x709) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@ -31,123 +31,122 @@
*/ */
#define STUB_I386_NETBSD_ELF_FOLD_SIZE 1809 #define STUB_I386_NETBSD_ELF_FOLD_SIZE 1801
#define STUB_I386_NETBSD_ELF_FOLD_ADLER32 0x8cfe07f6 #define STUB_I386_NETBSD_ELF_FOLD_ADLER32 0x4e60064e
#define STUB_I386_NETBSD_ELF_FOLD_CRC32 0x8e80731e #define STUB_I386_NETBSD_ELF_FOLD_CRC32 0xaf3043d8
unsigned char stub_i386_netbsd_elf_fold[1809] = { unsigned char stub_i386_netbsd_elf_fold[1801] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0, /* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0, /* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0,
/* 0x0040 */ 0, 16,192, 0, 17, 7, 0, 0, 20, 7, 0, 0, 5, 0, 0, 0, /* 0x0040 */ 0, 16,192, 0, 9, 7, 0, 0, 12, 7, 0, 0, 5, 0, 0, 0,
/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0, 17, 7, 0, 0, 0, 0, 0, 0, /* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0, 9, 7, 0, 0, 0, 0, 0, 0,
/* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 41,201,186,248, 2, 0, 0,137,230,137,231,232,144, 0, 0, 0, /* 0x0080 */ 41,201,186,248, 2, 0, 0,137,230,137,231,232,134, 0, 0, 0,
/* 0x0090 */ 137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137, /* 0x0090 */ 137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137,
/* 0x00a0 */ 231,232,122, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72, /* 0x00a0 */ 231,232,112, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72,
/* 0x00b0 */ 141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192, /* 0x00b0 */ 141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192,
/* 0x00c0 */ 102,131,123, 16, 3,117, 1,146, 80,139,115, 24,139,131,136, 0, /* 0x00c0 */ 102,131,123, 16, 3,117, 1,146, 80,139, 67, 24,139,112,248, 41,
/* 0x00d0 */ 0, 0,141,132, 24,172, 0, 0, 0, 41,198,139, 24,139, 72, 4, /* 0x00d0 */ 240,139, 24,139, 72, 4,131,193, 12,141, 84, 36, 12, 96, 71,232,
/* 0x00e0 */ 131,193, 12,141, 84, 36, 12, 96, 71,232,126, 4, 0, 0,131,196, /* 0x00e0 */ 128, 4, 0, 0,131,196, 36, 89, 91,129,196, 0, 10, 0, 0, 90,
/* 0x00f0 */ 36, 89, 91,129,196, 0, 10, 0, 0, 90,193,226, 12, 1,211, 80, /* 0x00f0 */ 193,226, 12, 1,211, 80,106, 0,137,229, 41,217, 41,192, 81, 83,
/* 0x0100 */ 106, 0,137,229, 41,217, 41,192, 81, 83, 80, 79, 60,175,175,117, /* 0x0100 */ 80, 79, 60,175,175,117,252,255, 55, 49,255, 49,246, 49,210, 49,
/* 0x0110 */ 252,255, 55, 49,255, 49,246, 49,210, 49,201, 49,219,176, 73,195, /* 0x0110 */ 201, 49,219,176, 73,195,173,171,173,171,133,192,117,250,173,171,
/* 0x0120 */ 173,171,173,171,133,192,117,250,173,171,133,192,117,250, 87,173, /* 0x0120 */ 133,192,117,250, 87,173,171,131,248, 32,115, 3, 15,179,194,133,
/* 0x0130 */ 171,131,248, 32,115, 3, 15,179,194,133,192,173,171,117,240,131, /* 0x0130 */ 192,173,171,117,240,131,239, 8, 1,201, 64,243,171, 72,171,171,
/* 0x0140 */ 239, 8, 1,201, 64,243,171, 72,171,171, 95,195, 85,137,229, 87, /* 0x0140 */ 95,195, 0, 0, 85,137,229, 87, 86,137,206, 83,137,195, 57, 8,
/* 0x0150 */ 86,137,206, 83,137,195, 57, 8,139,120, 4,115, 7,106,127,232, /* 0x0150 */ 139,120, 4,115, 7,106,127,232,101, 5, 0, 0,133,201,116, 8,
/* 0x0160 */ 101, 5, 0, 0,133,201,116, 8,138, 7, 71,136, 2, 66,226,248, /* 0x0160 */ 138, 7, 71,136, 2, 66,226,248, 1,115, 4, 41, 51,141,101,244,
/* 0x0170 */ 1,115, 4, 41, 51,141,101,244, 91, 94, 95,201,195, 85,137,229, /* 0x0170 */ 91, 94, 95,201,195, 85,137,229, 87, 86,137,198, 83,137,211,131,
/* 0x0180 */ 87, 86,137,198, 83,137,211,131,236, 24,139, 69, 8,139,125, 12, /* 0x0180 */ 236, 24,139, 69, 8,139,125, 12,137, 69,220,131, 58, 0, 15,132,
/* 0x0190 */ 137, 69,220,131, 58, 0, 15,132,182, 0, 0, 0,141, 85,228,185, /* 0x0190 */ 182, 0, 0, 0,141, 85,228,185, 12, 0, 0, 0,137,240,232,161,
/* 0x01a0 */ 12, 0, 0, 0,137,240,232,161,255,255,255,139, 69,228,139, 77, /* 0x01a0 */ 255,255,255,139, 69,228,139, 77,232,133,192,117, 19,129,249, 85,
/* 0x01b0 */ 232,133,192,117, 19,129,249, 85, 80, 88, 33,117, 15,131, 62, 0, /* 0x01b0 */ 80, 88, 33,117, 15,131, 62, 0, 15,132,140, 0, 0, 0,235, 4,
/* 0x01c0 */ 15,132,140, 0, 0, 0,235, 4,133,201,117, 7,106,127,232,246, /* 0x01c0 */ 133,201,117, 7,106,127,232,246, 4, 0, 0, 57,193,119,245, 59,
/* 0x01d0 */ 4, 0, 0, 57,193,119,245, 59, 3,119,241, 57,193,115, 86,137, /* 0x01d0 */ 3,119,241, 57,193,115, 86,137, 69,224,141, 69,224,255,117,236,
/* 0x01e0 */ 69,224,141, 69,224,255,117,236, 80,255,115, 4, 81,255,118, 4, /* 0x01e0 */ 80,255,115, 4, 81,255,118, 4,255, 85,220,131,196, 20,133,192,
/* 0x01f0 */ 255, 85,220,131,196, 20,133,192,117,210,139, 85,224, 59, 85,228, /* 0x01f0 */ 117,210,139, 85,224, 59, 85,228,117,202,138, 69,237,132,192,116,
/* 0x0200 */ 117,202,138, 69,237,132,192,116, 34,133,255,116, 30,129,250, 0, /* 0x0200 */ 34,133,255,116, 30,129,250, 0, 2, 0, 0,119, 4, 57, 19,117,
/* 0x0210 */ 2, 0, 0,119, 4, 57, 19,117, 18, 15,182,192, 80, 15,182, 69, /* 0x0210 */ 18, 15,182,192, 80, 15,182, 69,238, 80, 82,255,115, 4,255,215,
/* 0x0220 */ 238, 80, 82,255,115, 4,255,215,131,196, 16,139, 69,232, 1, 70, /* 0x0220 */ 131,196, 16,139, 69,232, 1, 70, 4, 41, 6,235, 10,139, 83, 4,
/* 0x0230 */ 4, 41, 6,235, 10,139, 83, 4,137,240,232, 13,255,255,255,139, /* 0x0230 */ 137,240,232, 13,255,255,255,139, 85,228,139, 3, 1, 83, 4, 41,
/* 0x0240 */ 85,228,139, 3, 1, 83, 4, 41,208,133,192,137, 3,233, 68,255, /* 0x0240 */ 208,133,192,137, 3,233, 68,255,255,255,141,101,244, 91, 94, 95,
/* 0x0250 */ 255,255,141,101,244, 91, 94, 95,201,195,133,192, 83,137,211,116, /* 0x0250 */ 201,195,133,192, 83,137,211,116, 29,168, 1,117, 25,139, 16, 57,
/* 0x0260 */ 29,168, 1,117, 25,139, 16, 57,218,116, 7, 74,117, 11,133,219, /* 0x0260 */ 218,116, 7, 74,117, 11,133,219,116, 7,137, 24,137, 72, 4,235,
/* 0x0270 */ 116, 7,137, 24,137, 72, 4,235, 5,131,192, 8,235,231, 91,195, /* 0x0270 */ 5,131,192, 8,235,231, 91,195, 85,137,229, 87, 86, 83,131,236,
/* 0x0280 */ 85,137,229, 87, 86, 83,131,236, 60,137, 69,228,139, 69, 8,137, /* 0x0280 */ 60,137, 69,228,139, 69, 8,137, 85,224,139,125,224,199, 69,204,
/* 0x0290 */ 85,224,139,125,224,199, 69,204,255,255,255,255,139, 85, 12,137, /* 0x0290 */ 255,255,255,255,139, 85, 12,137, 69,220,139, 69,224,139, 77, 20,
/* 0x02a0 */ 69,220,139, 69,224,139, 77, 20,137, 85,216, 3,127, 28,139, 85, /* 0x02a0 */ 137, 85,216, 3,127, 28,139, 85,224,137, 77,212,102,131,120, 16,
/* 0x02b0 */ 224,137, 77,212,102,131,120, 16, 2, 15,183, 74, 44,137,251, 15, /* 0x02b0 */ 2, 15,183, 74, 44,137,251, 15,148,192, 49,246, 15,182,192,137,
/* 0x02c0 */ 148,192, 49,246, 15,182,192,137,202,193,224, 4, 5, 2, 16, 0, /* 0x02c0 */ 202,193,224, 4, 5, 2, 16, 0, 0, 74,120, 30,131, 59, 1,117,
/* 0x02d0 */ 0, 74,120, 30,131, 59, 1,117, 20,139, 83, 8, 59, 85,204,115, /* 0x02d0 */ 20,139, 83, 8, 59, 85,204,115, 3,137, 85,204, 3, 83, 20, 57,
/* 0x02e0 */ 3,137, 85,204, 3, 83, 20, 57,214,115, 2,137,214,131,195, 32, /* 0x02e0 */ 214,115, 2,137,214,131,195, 32,226,226,139, 93,204,106, 0,106,
/* 0x02f0 */ 226,226,139, 93,204,106, 0,106,255,129,227, 0,240,255,255, 80, /* 0x02f0 */ 255,129,227, 0,240,255,255, 80, 41,222,106, 0,129,198,255, 15,
/* 0x0300 */ 41,222,106, 0,129,198,255, 15, 0, 0,129,230, 0,240,255,255, /* 0x0300 */ 0, 0,129,230, 0,240,255,255, 86, 83,232,141, 3, 0, 0,139,
/* 0x0310 */ 86, 83,232,141, 3, 0, 0,139, 77,224,141, 52, 48,131,196, 24, /* 0x0310 */ 77,224,141, 52, 48,131,196, 24, 41,216,102,131,121, 44, 0,137,
/* 0x0320 */ 41,216,102,131,121, 44, 0,137,117,240,137, 69,208,199, 69,200, /* 0x0320 */ 117,240,137, 69,208,199, 69,200, 0, 0, 0, 0, 15,132,232, 1,
/* 0x0330 */ 0, 0, 0, 0, 15,132,232, 1, 0, 0,139, 7,131,248, 6,117, /* 0x0330 */ 0, 0,139, 7,131,248, 6,117, 34,131,125,220, 0, 15,132,193,
/* 0x0340 */ 34,131,125,220, 0, 15,132,193, 1, 0, 0,139, 77,208,186, 3, /* 0x0340 */ 1, 0, 0,139, 77,208,186, 3, 0, 0, 0, 3, 79, 8,139, 69,
/* 0x0350 */ 0, 0, 0, 3, 79, 8,139, 69,216,232,252,254,255,255,233,169, /* 0x0350 */ 216,232,252,254,255,255,233,169, 1, 0, 0, 72, 15,133,162, 1,
/* 0x0360 */ 1, 0, 0, 72, 15,133,162, 1, 0, 0,139, 79, 24,199, 69,196, /* 0x0360 */ 0, 0,139, 79, 24,199, 69,196, 64, 98, 81,115,139, 69,208,131,
/* 0x0370 */ 64, 98, 81,115,139, 69,208,131,225, 7, 3, 71, 8,193,225, 2, /* 0x0370 */ 225, 7, 3, 71, 8,193,225, 2,139, 87, 16,211,109,196,139, 79,
/* 0x0380 */ 139, 87, 16,211,109,196,139, 79, 20,137,198,131,101,196, 7, 1, /* 0x0380 */ 20,137,198,131,101,196, 7, 1,193,137, 85,232,137, 77,188,137,
/* 0x0390 */ 193,137, 85,232,137, 77,188,137,193,129,225,255, 15, 0, 0,137, /* 0x0390 */ 193,129,225,255, 15, 0, 0,137, 69,236, 1,202, 41,206,131,125,
/* 0x03a0 */ 69,236, 1,202, 41,206,131,125,220, 0,137, 85,192,116, 41,106, /* 0x03a0 */ 220, 0,137, 85,192,116, 41,106, 0,139, 69,196,106,255,104, 18,
/* 0x03b0 */ 0,139, 69,196,106,255,104, 18, 16, 0, 0,131,200, 2, 80,137, /* 0x03b0 */ 16, 0, 0,131,200, 2, 80,137,208,131,192, 3, 80, 86,232,217,
/* 0x03c0 */ 208,131,192, 3, 80, 86,232,217, 2, 0, 0,131,196, 24, 57,198, /* 0x03c0 */ 2, 0, 0,131,196, 24, 57,198, 15,133,225, 0, 0, 0,235, 36,
/* 0x03d0 */ 15,133,225, 0, 0, 0,235, 36,139, 71, 4, 41,200, 80,255,117, /* 0x03d0 */ 139, 71, 4, 41,200, 80,255,117,228,106, 18,255,117,196,255,117,
/* 0x03e0 */ 228,106, 18,255,117,196,255,117,192, 86,232,181, 2, 0, 0,131, /* 0x03e0 */ 192, 86,232,181, 2, 0, 0,131,196, 24, 57,198, 15,133,189, 0,
/* 0x03f0 */ 196, 24, 57,198, 15,133,189, 0, 0, 0,235, 34,131,125,220, 0, /* 0x03f0 */ 0, 0,235, 34,131,125,220, 0,116, 28,246, 69,196, 4,139, 69,
/* 0x0400 */ 116, 28,246, 69,196, 4,139, 69,212,117, 2, 49,192, 80,139, 69, /* 0x0400 */ 212,117, 2, 49,192, 80,139, 69,220,255,117,228,141, 85,232,232,
/* 0x0410 */ 220,255,117,228,141, 85,232,232, 97,253,255,255, 88, 90,139, 69, /* 0x0410 */ 97,253,255,255, 88, 90,139, 69,192,247,216, 37,255, 15, 0, 0,
/* 0x0420 */ 192,247,216, 37,255, 15, 0, 0,246, 69,196, 2,137, 69,184,116, /* 0x0420 */ 246, 69,196, 2,137, 69,184,116, 21,131,125,184, 0,139, 85,192,
/* 0x0430 */ 21,131,125,184, 0,139, 85,192,141, 4, 22,116, 9,139, 77,184, /* 0x0430 */ 141, 4, 22,116, 9,139, 77,184,198, 0, 0, 64,226,250,131,125,
/* 0x0440 */ 198, 0, 0, 64,226,250,131,125,220, 0,116,114,131, 63, 1,117, /* 0x0440 */ 220, 0,116,114,131, 63, 1,117, 83,246, 71, 24, 1,116, 77,139,
/* 0x0450 */ 83,246, 71, 24, 1,116, 77,139, 87, 20,139, 95, 8,141, 12, 26, /* 0x0450 */ 87, 20,139, 95, 8,141, 12, 26, 3, 77,208, 59, 87, 16,117, 14,
/* 0x0460 */ 3, 77,208, 59, 87, 16,117, 14,137,200,247,216, 37,255, 15, 0, /* 0x0460 */ 137,200,247,216, 37,255, 15, 0, 0,131,248, 3,119, 14,107, 69,
/* 0x0470 */ 0,131,248, 3,119, 14,107, 69,208, 52,131,127, 4, 0,141, 76, /* 0x0470 */ 208, 52,131,127, 4, 0,141, 76, 3, 12,117, 15,139, 1, 61,205,
/* 0x0480 */ 3, 12,117, 15,139, 1, 61,205,128,201,195,116, 6,199, 1,205, /* 0x0480 */ 128,201,195,116, 6,199, 1,205,128,201,195,133,201,116, 13,139,
/* 0x0490 */ 128,201,195,133,201,116, 13,139, 69,216, 49,210,131,224,254,232, /* 0x0490 */ 69,216, 49,210,131,224,254,232,182,253,255,255,255,117,196,255,
/* 0x04a0 */ 182,253,255,255,255,117,196,255,117,192, 86,232, 53, 2, 0, 0, /* 0x04a0 */ 117,192, 86,232, 53, 2, 0, 0,131,196, 12,133,192,116, 7,106,
/* 0x04b0 */ 131,196, 12,133,192,116, 7,106,127,232, 11, 2, 0, 0,139, 69, /* 0x04b0 */ 127,232, 11, 2, 0, 0,139, 69,192, 3, 69,184,141, 28, 6, 59,
/* 0x04c0 */ 192, 3, 69,184,141, 28, 6, 59, 93,188,115, 33,106, 0,106,255, /* 0x04c0 */ 93,188,115, 33,106, 0,106,255,104, 18, 16, 0, 0,255,117,196,
/* 0x04d0 */ 104, 18, 16, 0, 0,255,117,196, 41, 93,188,255,117,188, 83,232, /* 0x04d0 */ 41, 93,188,255,117,188, 83,232,192, 1, 0, 0,131,196, 24, 57,
/* 0x04e0 */ 192, 1, 0, 0,131,196, 24, 57,195,116, 33,235,202,131,125,220, /* 0x04e0 */ 195,116, 33,235,202,131,125,220, 0,116, 25,139, 69,192,131,192,
/* 0x04f0 */ 0,116, 25,139, 69,192,131,192, 3, 37,255, 15, 0, 0,131,248, /* 0x04f0 */ 3, 37,255, 15, 0, 0,131,248, 3,119, 9, 80, 83,232,215, 1,
/* 0x0500 */ 3,119, 9, 80, 83,232,215, 1, 0, 0, 89, 91,139, 77,224,131, /* 0x0500 */ 0, 0, 89, 91,139, 77,224,131,199, 32,255, 69,200, 15,183, 65,
/* 0x0510 */ 199, 32,255, 69,200, 15,183, 65, 44, 57, 69,200, 15,140, 24,254, /* 0x0510 */ 44, 57, 69,200, 15,140, 24,254,255,255,131,125,220, 0,117, 15,
/* 0x0520 */ 255,255,131,125,220, 0,117, 15,255,117,228,232,173, 1, 0, 0, /* 0x0520 */ 255,117,228,232,173, 1, 0, 0, 90,133,192,116, 21,235,128,139,
/* 0x0530 */ 90,133,192,116, 21,235,128,139, 69,224,102,131,120, 16, 3,116, /* 0x0530 */ 69,224,102,131,120, 16, 3,116, 9,255,117,240,232,127, 1, 0,
/* 0x0540 */ 9,255,117,240,232,127, 1, 0, 0, 88,131,125, 16, 0,116, 8, /* 0x0540 */ 0, 88,131,125, 16, 0,116, 8,139, 77,208,139, 85, 16,137, 10,
/* 0x0550 */ 139, 77,208,139, 85, 16,137, 10,139, 69,224,139, 64, 24, 1, 69, /* 0x0550 */ 139, 69,224,139, 64, 24, 1, 69,208,139, 69,208,141,101,244, 91,
/* 0x0560 */ 208,139, 69,208,141,101,244, 91, 94, 95,201,195, 85,137,229, 87, /* 0x0560 */ 94, 95,201,195, 85,137,229, 87, 86, 83,131,236, 16,141, 85, 24,
/* 0x0570 */ 86, 83,131,236, 16,141, 85, 24,139, 69, 8,106, 0,139,125, 28, /* 0x0570 */ 139, 69, 8,106, 0,139,125, 28,137, 69,236,139, 69, 16,139, 93,
/* 0x0580 */ 137, 69,236,139, 69, 16,139, 93, 32,141,119, 52,137, 69,232,131, /* 0x0580 */ 32,141,119, 52,137, 69,232,131,192, 2,255,117,232,137, 69,228,
/* 0x0590 */ 192, 2,255,117,232,137, 69,228,141, 69, 32,232,221,251,255,255, /* 0x0590 */ 141, 69, 32,232,221,251,255,255,139, 69, 12,185, 0, 16, 0, 0,
/* 0x05a0 */ 139, 69, 12,185, 0, 16, 0, 0,186, 6, 0, 0, 0,137, 69, 32, /* 0x05a0 */ 186, 6, 0, 0, 0,137, 69, 32,139, 69,236, 41, 93, 36,232,159,
/* 0x05b0 */ 139, 69,236, 41, 93, 36,232,159,252,255,255, 15,183, 79, 44,139, /* 0x05b0 */ 252,255,255, 15,183, 79, 44,139, 69,236,186, 5, 0, 0, 0,232,
/* 0x05c0 */ 69,236,186, 5, 0, 0, 0,232,142,252,255,255, 15,183, 79, 42, /* 0x05c0 */ 142,252,255,255, 15,183, 79, 42,139, 69,236,186, 4, 0, 0, 0,
/* 0x05d0 */ 139, 69,236,186, 4, 0, 0, 0,232,125,252,255,255,139, 77, 40, /* 0x05d0 */ 232,125,252,255,255,139, 77, 40, 3, 78, 8,186, 3, 0, 0, 0,
/* 0x05e0 */ 3, 78, 8,186, 3, 0, 0, 0,139, 69,236,131,193, 52,232,103, /* 0x05e0 */ 139, 69,236,131,193, 52,232,103,252,255,255,141, 69,240,255,117,
/* 0x05f0 */ 252,255,255,141, 69,240,255,117,228,137,250, 80,141, 69, 32,255, /* 0x05f0 */ 228,137,250, 80,141, 69, 32,255,117,236, 80,139, 69,232,232,117,
/* 0x0600 */ 117,236, 80,139, 69,232,232,117,252,255,255,186, 9, 0, 0, 0, /* 0x0600 */ 252,255,255,186, 9, 0, 0, 0,137,193,137,195,139, 69,236,232,
/* 0x0610 */ 137,193,137,195,139, 69,236,232, 62,252,255,255,102,139, 79, 44, /* 0x0610 */ 62,252,255,255,102,139, 79, 44,131,196, 24, 49,210,102,133,201,
/* 0x0620 */ 131,196, 24, 49,210,102,133,201,116,112,131, 62, 3,117, 96,106, /* 0x0620 */ 116,112,131, 62, 3,117, 96,106, 0,139, 69,240,106, 0, 3, 70,
/* 0x0630 */ 0,139, 69,240,106, 0, 3, 70, 8, 80,232,154, 0, 0, 0,131, /* 0x0630 */ 8, 80,232,154, 0, 0, 0,131,196, 12,133,192,137,195,120, 22,
/* 0x0640 */ 196, 12,133,192,137,195,120, 22,104, 0, 2, 0, 0, 87, 80,232, /* 0x0640 */ 104, 0, 2, 0, 0, 87, 80,232,125, 0, 0, 0,131,196, 12, 61,
/* 0x0650 */ 125, 0, 0, 0,131,196, 12, 61, 0, 2, 0, 0,116, 7,106,127, /* 0x0650 */ 0, 2, 0, 0,116, 7,106,127,232,100, 0, 0, 0,141, 69,240,
/* 0x0660 */ 232,100, 0, 0, 0,141, 69,240,137,250,106, 0, 80,137,216,106, /* 0x0660 */ 137,250,106, 0, 80,137,216,106, 0,106, 0,232, 8,252,255,255,
/* 0x0670 */ 0,106, 0,232, 8,252,255,255,139, 77,240,137,195,139, 69,236, /* 0x0670 */ 139, 77,240,137,195,139, 69,236,186, 7, 0, 0, 0,232,208,251,
/* 0x0680 */ 186, 7, 0, 0, 0,232,208,251,255,255,131,196, 16,235, 11, 66, /* 0x0680 */ 255,255,131,196, 16,235, 11, 66, 15,183,193,131,198, 32, 57,194,
/* 0x0690 */ 15,183,193,131,198, 32, 57,194,124,144,141,101,244,137,216, 91, /* 0x0690 */ 124,144,141,101,244,137,216, 91, 94, 95,201,195, 85,137,229, 49,
/* 0x06a0 */ 94, 95,201,195, 85,137,229, 49,192, 80,255,117, 28, 80,255,117, /* 0x06a0 */ 192, 80,255,117, 28, 80,255,117, 24,255,117, 20,255,117, 16,255,
/* 0x06b0 */ 24,255,117, 20,255,117, 16,255,117, 12,255,117, 8, 80,176,197, /* 0x06b0 */ 117, 12,255,117, 8, 80,176,197, 80, 80,176,198,205,128,201,195,
/* 0x06c0 */ 80, 80,176,198,205,128,201,195,195,176, 1, 15,182,192,205,128, /* 0x06c0 */ 195,176, 1, 15,182,192,205,128,195,176, 3,235,246,176, 4,235,
/* 0x06d0 */ 195,176, 3,235,246,176, 4,235,242,176, 5,235,238,176, 6,235, /* 0x06d0 */ 242,176, 5,235,238,176, 6,235,234,176, 73,235,230,176, 74,235,
/* 0x06e0 */ 234,176, 73,235,230,176, 74,235,226,176, 33,235,222,176, 20,235, /* 0x06e0 */ 226,176, 33,235,222,176, 20,235,218,176, 92,235,214,176, 59,235,
/* 0x06f0 */ 218,176, 92,235,214,176, 59,235,210,176, 2,235,206,176,130,235, /* 0x06f0 */ 210,176, 2,235,206,176,130,235,202,176,116,235,198,176,240,235,
/* 0x0700 */ 202,176,116,235,198,176,240,235,194,176, 10,235,190,176, 7,235, /* 0x0700 */ 194,176, 10,235,190,176, 7,235,186
/* 0x0710 */ 186
}; };

View File

@ -1,5 +1,5 @@
/* i386-openbsd.elf-fold.h /* i386-openbsd.elf-fold.h
created from i386-openbsd.elf-fold.bin, 2037 (0x7f5) bytes created from i386-openbsd.elf-fold.bin, 2029 (0x7ed) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@ -31,137 +31,136 @@
*/ */
#define STUB_I386_OPENBSD_ELF_FOLD_SIZE 2037 #define STUB_I386_OPENBSD_ELF_FOLD_SIZE 2029
#define STUB_I386_OPENBSD_ELF_FOLD_ADLER32 0x9fc663c6 #define STUB_I386_OPENBSD_ELF_FOLD_ADLER32 0xd1a2621e
#define STUB_I386_OPENBSD_ELF_FOLD_CRC32 0xe41e59f7 #define STUB_I386_OPENBSD_ELF_FOLD_CRC32 0xad38ea9c
unsigned char stub_i386_openbsd_elf_fold[2037] = { unsigned char stub_i386_openbsd_elf_fold[2029] = {
/* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 1, 1, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0, /* 0x0010 */ 2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0,
/* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0, /* 0x0030 */ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0,
/* 0x0040 */ 0, 16,192, 0,245, 7, 0, 0,248, 7, 0, 0, 5, 0, 0, 0, /* 0x0040 */ 0, 16,192, 0,237, 7, 0, 0,240, 7, 0, 0, 5, 0, 0, 0,
/* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0,245, 7, 0, 0, 0, 0, 0, 0, /* 0x0050 */ 0, 16, 0, 0, 1, 0, 0, 0,237, 7, 0, 0, 0, 0, 0, 0,
/* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0060 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0070 */ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0080 */ 41,201,186,248, 2, 0, 0,137,230,137,231,232,144, 0, 0, 0, /* 0x0080 */ 41,201,186,248, 2, 0, 0,137,230,137,231,232,134, 0, 0, 0,
/* 0x0090 */ 137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137, /* 0x0090 */ 137,230,209,234, 25,192, 41,193,141, 36,196,133,210,117,243,137,
/* 0x00a0 */ 231,232,122, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72, /* 0x00a0 */ 231,232,112, 0, 0, 0,129,236, 0, 10, 0, 0, 83,139, 83, 72,
/* 0x00b0 */ 141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192, /* 0x00b0 */ 141,148, 26,255, 31, 0, 0,129,226, 0,240,255,255, 82, 41,192,
/* 0x00c0 */ 102,131,123, 16, 3,117, 1,146, 80,139,115, 24,139,131,136, 0, /* 0x00c0 */ 102,131,123, 16, 3,117, 1,146, 80,139, 67, 24,139,112,248, 41,
/* 0x00d0 */ 0, 0,141,132, 24,172, 0, 0, 0, 41,198,139, 24,139, 72, 4, /* 0x00d0 */ 240,139, 24,139, 72, 4,131,193, 12,141, 84, 36, 12, 96, 71,232,
/* 0x00e0 */ 131,193, 12,141, 84, 36, 12, 96, 71,232, 73, 5, 0, 0,131,196, /* 0x00e0 */ 75, 5, 0, 0,131,196, 36, 89, 91,129,196, 0, 10, 0, 0, 90,
/* 0x00f0 */ 36, 89, 91,129,196, 0, 10, 0, 0, 90,193,226, 12, 1,211, 80, /* 0x00f0 */ 193,226, 12, 1,211, 80,106, 0,137,229, 41,217, 41,192, 81, 83,
/* 0x0100 */ 106, 0,137,229, 41,217, 41,192, 81, 83, 80, 79, 60,175,175,117, /* 0x0100 */ 80, 79, 60,175,175,117,252,255, 55, 49,255, 49,246, 49,210, 49,
/* 0x0110 */ 252,255, 55, 49,255, 49,246, 49,210, 49,201, 49,219,176, 73,195, /* 0x0110 */ 201, 49,219,176, 73,195,173,171,173,171,133,192,117,250,173,171,
/* 0x0120 */ 173,171,173,171,133,192,117,250,173,171,133,192,117,250, 87,173, /* 0x0120 */ 133,192,117,250, 87,173,171,131,248, 32,115, 3, 15,179,194,133,
/* 0x0130 */ 171,131,248, 32,115, 3, 15,179,194,133,192,173,171,117,240,131, /* 0x0130 */ 192,173,171,117,240,131,239, 8, 1,201, 64,243,171, 72,171,171,
/* 0x0140 */ 239, 8, 1,201, 64,243,171, 72,171,171, 95,195, 85,137,229, 87, /* 0x0140 */ 95,195, 0, 0, 85,137,229, 87, 86,137,206, 83,137,195, 57, 8,
/* 0x0150 */ 86,137,206, 83,137,195, 57, 8,139,120, 4,115, 7,106,127,232, /* 0x0150 */ 139,120, 4,115, 7,106,127,232, 73, 6, 0, 0,133,201,116, 8,
/* 0x0160 */ 73, 6, 0, 0,133,201,116, 8,138, 7, 71,136, 2, 66,226,248, /* 0x0160 */ 138, 7, 71,136, 2, 66,226,248, 1,115, 4, 41, 51,141,101,244,
/* 0x0170 */ 1,115, 4, 41, 51,141,101,244, 91, 94, 95,201,195, 85,137,229, /* 0x0170 */ 91, 94, 95,201,195, 85,137,229, 87, 86,137,198, 83,137,211,131,
/* 0x0180 */ 87, 86,137,198, 83,137,211,131,236, 24,139, 69, 8,139,125, 12, /* 0x0180 */ 236, 24,139, 69, 8,139,125, 12,137, 69,220,131, 58, 0, 15,132,
/* 0x0190 */ 137, 69,220,131, 58, 0, 15,132,182, 0, 0, 0,141, 85,228,185, /* 0x0190 */ 182, 0, 0, 0,141, 85,228,185, 12, 0, 0, 0,137,240,232,161,
/* 0x01a0 */ 12, 0, 0, 0,137,240,232,161,255,255,255,139, 69,228,139, 77, /* 0x01a0 */ 255,255,255,139, 69,228,139, 77,232,133,192,117, 19,129,249, 85,
/* 0x01b0 */ 232,133,192,117, 19,129,249, 85, 80, 88, 33,117, 15,131, 62, 0, /* 0x01b0 */ 80, 88, 33,117, 15,131, 62, 0, 15,132,140, 0, 0, 0,235, 4,
/* 0x01c0 */ 15,132,140, 0, 0, 0,235, 4,133,201,117, 7,106,127,232,218, /* 0x01c0 */ 133,201,117, 7,106,127,232,218, 5, 0, 0, 57,193,119,245, 59,
/* 0x01d0 */ 5, 0, 0, 57,193,119,245, 59, 3,119,241, 57,193,115, 86,137, /* 0x01d0 */ 3,119,241, 57,193,115, 86,137, 69,224,141, 69,224,255,117,236,
/* 0x01e0 */ 69,224,141, 69,224,255,117,236, 80,255,115, 4, 81,255,118, 4, /* 0x01e0 */ 80,255,115, 4, 81,255,118, 4,255, 85,220,131,196, 20,133,192,
/* 0x01f0 */ 255, 85,220,131,196, 20,133,192,117,210,139, 85,224, 59, 85,228, /* 0x01f0 */ 117,210,139, 85,224, 59, 85,228,117,202,138, 69,237,132,192,116,
/* 0x0200 */ 117,202,138, 69,237,132,192,116, 34,133,255,116, 30,129,250, 0, /* 0x0200 */ 34,133,255,116, 30,129,250, 0, 2, 0, 0,119, 4, 57, 19,117,
/* 0x0210 */ 2, 0, 0,119, 4, 57, 19,117, 18, 15,182,192, 80, 15,182, 69, /* 0x0210 */ 18, 15,182,192, 80, 15,182, 69,238, 80, 82,255,115, 4,255,215,
/* 0x0220 */ 238, 80, 82,255,115, 4,255,215,131,196, 16,139, 69,232, 1, 70, /* 0x0220 */ 131,196, 16,139, 69,232, 1, 70, 4, 41, 6,235, 10,139, 83, 4,
/* 0x0230 */ 4, 41, 6,235, 10,139, 83, 4,137,240,232, 13,255,255,255,139, /* 0x0230 */ 137,240,232, 13,255,255,255,139, 85,228,139, 3, 1, 83, 4, 41,
/* 0x0240 */ 85,228,139, 3, 1, 83, 4, 41,208,133,192,137, 3,233, 68,255, /* 0x0240 */ 208,133,192,137, 3,233, 68,255,255,255,141,101,244, 91, 94, 95,
/* 0x0250 */ 255,255,141,101,244, 91, 94, 95,201,195,133,192, 83,137,211,116, /* 0x0250 */ 201,195,133,192, 83,137,211,116, 29,168, 1,117, 25,139, 16, 57,
/* 0x0260 */ 29,168, 1,117, 25,139, 16, 57,218,116, 7, 74,117, 11,133,219, /* 0x0260 */ 218,116, 7, 74,117, 11,133,219,116, 7,137, 24,137, 72, 4,235,
/* 0x0270 */ 116, 7,137, 24,137, 72, 4,235, 5,131,192, 8,235,231, 91,195, /* 0x0270 */ 5,131,192, 8,235,231, 91,195, 85,137,229, 87, 86, 83,131,236,
/* 0x0280 */ 85,137,229, 87, 86, 83,131,236,104,137, 69,200,139, 69, 12,137, /* 0x0280 */ 104,137, 69,200,139, 69, 12,137, 85,196,139, 77, 24,199, 69,228,
/* 0x0290 */ 85,196,139, 77, 24,199, 69,228, 0, 0, 0, 0,137, 69,192,139, /* 0x0290 */ 0, 0, 0, 0,137, 69,192,139, 69,196,137, 77,184,139, 93,196,
/* 0x02a0 */ 69,196,137, 77,184,139, 93,196,139,117,196,199, 69,232, 0, 0, /* 0x02a0 */ 139,117,196,199, 69,232, 0, 0, 0, 0, 15,183, 72, 44,199, 69,
/* 0x02b0 */ 0, 0, 15,183, 72, 44,199, 69,220, 0, 0, 0, 0,139, 85, 16, /* 0x02b0 */ 220, 0, 0, 0, 0,139, 85, 16,199, 69,224, 0, 0, 0, 0, 3,
/* 0x02c0 */ 199, 69,224, 0, 0, 0, 0, 3, 91, 28,199, 69,236,255,255,255, /* 0x02c0 */ 91, 28,199, 69,236,255,255,255,255, 15,183,118, 16,137, 85,188,
/* 0x02d0 */ 255, 15,183,118, 16,137, 85,188,137,202,199, 69,240,255,255,255, /* 0x02d0 */ 137,202,199, 69,240,255,255,255,255, 74,137, 93,180,137,117,176,
/* 0x02e0 */ 255, 74,137, 93,180,137,117,176,199, 69,148, 0, 0, 0, 0,120, /* 0x02e0 */ 199, 69,148, 0, 0, 0, 0,120, 62,137,206,131, 59, 1,117, 49,
/* 0x02f0 */ 62,137,206,131, 59, 1,117, 49,139, 67, 24,139, 75, 8,131,224, /* 0x02f0 */ 139, 67, 24,139, 75, 8,131,224, 1,141, 20,133, 0, 0, 0, 0,
/* 0x0300 */ 1,141, 20,133, 0, 0, 0, 0, 57, 76, 42,236,118, 11,139, 67, /* 0x0300 */ 57, 76, 42,236,118, 11,139, 67, 16,137, 76, 42,236,137, 68, 21,
/* 0x0310 */ 16,137, 76, 42,236,137, 68, 21,228,139, 67, 20,141,125,220, 1, /* 0x0310 */ 228,139, 67, 20,141,125,220, 1,200, 57, 4, 58,115, 3,137, 4,
/* 0x0320 */ 200, 57, 4, 58,115, 3,137, 4, 58,131,195, 32, 78,117,196,131, /* 0x0320 */ 58,131,195, 32, 78,117,196,131,125,176, 2,116, 63,129,125,220,
/* 0x0330 */ 125,176, 2,116, 63,129,125,220,255,255,255, 31,118, 54,139, 77, /* 0x0330 */ 255,255,255, 31,118, 54,139, 77, 8,139, 93, 8,139, 65, 4,137,
/* 0x0340 */ 8,139, 93, 8,139, 65, 4,137,194,137,193,139, 3,129,225,255, /* 0x0340 */ 194,137,193,139, 3,129,225,255,255,255, 3,129,226, 0, 0, 0,
/* 0x0350 */ 255,255, 3,129,226, 0, 0, 0,252, 37,255,255,255, 3, 57,193, /* 0x0350 */ 252, 37,255,255,255, 3, 57,193,118, 2,137,200,141,148, 2,255,
/* 0x0360 */ 118, 2,137,200,141,148, 2,255, 15, 0, 0,129,226, 0,240,255, /* 0x0360 */ 15, 0, 0,129,226, 0,240,255,255,137, 85,148,139,117, 8, 49,
/* 0x0370 */ 255,137, 85,148,139,117, 8, 49,255,199, 69,144, 1, 0, 0, 0, /* 0x0370 */ 255,199, 69,144, 1, 0, 0, 0,137,117,152,141, 69,236,139, 85,
/* 0x0380 */ 137,117,152,141, 69,236,139, 85,148,139,117,152,139, 28, 7,137, /* 0x0380 */ 148,139,117,152,139, 28, 7,137,217,129,227, 0,240,255,255,129,
/* 0x0390 */ 217,129,227, 0,240,255,255,129,225,255, 15, 0, 0, 3, 76, 47, /* 0x0390 */ 225,255, 15, 0, 0, 3, 76, 47,228,137, 28, 7,139, 68, 47,220,
/* 0x03a0 */ 228,137, 28, 7,139, 68, 47,220, 1,194, 41,216,137, 22, 3, 93, /* 0x03a0 */ 1,194, 41,216,137, 22, 3, 93,148,106, 0, 5,255, 15, 0, 0,
/* 0x03b0 */ 148,106, 0, 5,255, 15, 0, 0,106,255, 37, 0,240,255,255,104, /* 0x03b0 */ 106,255, 37, 0,240,255,255,104, 18, 16, 0, 0,129,193,255, 15,
/* 0x03c0 */ 18, 16, 0, 0,129,193,255, 15, 0, 0,106, 0,129,225, 0,240, /* 0x03c0 */ 0, 0,106, 0,129,225, 0,240,255,255, 80,131,198, 4, 83,137,
/* 0x03d0 */ 255,255, 80,131,198, 4, 83,137, 68, 47,220,137, 76, 47,228,232, /* 0x03d0 */ 68, 47,220,137, 76, 47,228,232,164, 3, 0, 0,137, 68, 61,212,
/* 0x03e0 */ 164, 3, 0, 0,137, 68, 61,212,131,196, 24,131,199, 4,255, 77, /* 0x03e0 */ 131,196, 24,131,199, 4,255, 77,144,137,117,152,121,141,139, 69,
/* 0x03f0 */ 144,137,117,152,121,141,139, 69,212,199, 69,168, 0, 0, 0, 0, /* 0x03f0 */ 212,199, 69,168, 0, 0, 0, 0,139, 85,236,139, 77,196, 41,208,
/* 0x0400 */ 139, 85,236,139, 77,196, 41,208,102,131,121, 44, 0,137, 69,172, /* 0x0400 */ 102,131,121, 44, 0,137, 69,172, 15,132,236, 1, 0, 0,139, 93,
/* 0x0410 */ 15,132,236, 1, 0, 0,139, 93,180,139, 3,131,248, 6,117, 34, /* 0x0410 */ 180,139, 3,131,248, 6,117, 34,131,125,192, 0, 15,132,193, 1,
/* 0x0420 */ 131,125,192, 0, 15,132,193, 1, 0, 0,139, 77,172,186, 3, 0, /* 0x0420 */ 0, 0,139, 77,172,186, 3, 0, 0, 0, 3, 75, 8,139, 69,188,
/* 0x0430 */ 0, 0, 3, 75, 8,139, 69,188,232, 29,254,255,255,233,169, 1, /* 0x0430 */ 232, 29,254,255,255,233,169, 1, 0, 0, 72, 15,133,162, 1, 0,
/* 0x0440 */ 0, 0, 72, 15,133,162, 1, 0, 0,139,117,180,199, 69,164, 64, /* 0x0440 */ 0,139,117,180,199, 69,164, 64, 98, 81,115,139, 69,172, 3, 70,
/* 0x0450 */ 98, 81,115,139, 69,172, 3, 70, 8,139, 78, 24,139, 86, 20,131, /* 0x0450 */ 8,139, 78, 24,139, 86, 20,131,225, 7,137, 69,208, 1,194,193,
/* 0x0460 */ 225, 7,137, 69,208, 1,194,193,225, 2,211,109,164,137, 85,156, /* 0x0460 */ 225, 2,211,109,164,137, 85,156,139, 78, 16,137,194,131,101,164,
/* 0x0470 */ 139, 78, 16,137,194,131,101,164, 7,129,226,255, 15, 0, 0,137, /* 0x0470 */ 7,129,226,255, 15, 0, 0,137, 77,204,141, 52, 17,139, 77,180,
/* 0x0480 */ 77,204,141, 52, 17,139, 77,180, 41,208,137, 69,160,139, 65, 4, /* 0x0480 */ 41,208,137, 69,160,139, 65, 4, 41,208,131,125,192, 0, 80,139,
/* 0x0490 */ 41,208,131,125,192, 0, 80,139, 69,200,116, 3,131,200,255,131, /* 0x0490 */ 69,200,116, 3,131,200,255,131,125,192, 1, 80, 25,192, 37, 0,
/* 0x04a0 */ 125,192, 1, 80, 25,192, 37, 0,240,255,255, 5, 18, 16, 0, 0, /* 0x04a0 */ 240,255,255, 5, 18, 16, 0, 0,131,125,192, 0, 80,139, 69,164,
/* 0x04b0 */ 131,125,192, 0, 80,139, 69,164,116, 3,131,200, 2,131,125,192, /* 0x04b0 */ 116, 3,131,200, 2,131,125,192, 0, 80,137,240,116, 3,141, 70,
/* 0x04c0 */ 0, 80,137,240,116, 3,141, 70, 3, 80,255,117,160,232,182, 2, /* 0x04c0 */ 3, 80,255,117,160,232,182, 2, 0, 0,131,196, 24, 57, 69,160,
/* 0x04d0 */ 0, 0,131,196, 24, 57, 69,160, 15,133,188, 0, 0, 0,131,125, /* 0x04d0 */ 15,133,188, 0, 0, 0,131,125,192, 0,116, 28,246, 69,164, 4,
/* 0x04e0 */ 192, 0,116, 28,246, 69,164, 4,139, 69,184,117, 2, 49,192, 80, /* 0x04e0 */ 139, 69,184,117, 2, 49,192, 80,139, 69,192,255,117,200,141, 85,
/* 0x04f0 */ 139, 69,192,255,117,200,141, 85,204,232,127,252,255,255, 95, 88, /* 0x04f0 */ 204,232,127,252,255,255, 95, 88,137,247,247,223,129,231,255, 15,
/* 0x0500 */ 137,247,247,223,129,231,255, 15, 0, 0,246, 69,164, 2,116, 17, /* 0x0500 */ 0, 0,246, 69,164, 2,116, 17,139, 69,160, 1,240,133,255,116,
/* 0x0510 */ 139, 69,160, 1,240,133,255,116, 8,137,249,198, 0, 0, 64,226, /* 0x0510 */ 8,137,249,198, 0, 0, 64,226,250,131,125,192, 0,116,122,139,
/* 0x0520 */ 250,131,125,192, 0,116,122,139, 93,180,131, 59, 1,117, 88,246, /* 0x0520 */ 93,180,131, 59, 1,117, 88,246, 67, 24, 1,116, 82,139, 83, 20,
/* 0x0530 */ 67, 24, 1,116, 82,139, 83, 20,137,216,139, 91, 8,141, 12, 26, /* 0x0530 */ 137,216,139, 91, 8,141, 12, 26, 3, 77,172, 59, 80, 16,117, 14,
/* 0x0540 */ 3, 77,172, 59, 80, 16,117, 14,137,200,247,216, 37,255, 15, 0, /* 0x0540 */ 137,200,247,216, 37,255, 15, 0, 0,131,248, 3,119, 17,139, 85,
/* 0x0550 */ 0,131,248, 3,119, 17,139, 85,180,107, 69,172, 52,131,122, 4, /* 0x0550 */ 180,107, 69,172, 52,131,122, 4, 0,141, 76, 3, 12,117, 15,139,
/* 0x0560 */ 0,141, 76, 3, 12,117, 15,139, 1, 61,205,128,201,195,116, 6, /* 0x0560 */ 1, 61,205,128,201,195,116, 6,199, 1,205,128,201,195,133,201,
/* 0x0570 */ 199, 1,205,128,201,195,133,201,116, 13,139, 69,188, 49,210,131, /* 0x0570 */ 116, 13,139, 69,188, 49,210,131,224,254,232,211,252,255,255,255,
/* 0x0580 */ 224,254,232,211,252,255,255,255,117,164, 86,255,117,160,232, 54, /* 0x0580 */ 117,164, 86,255,117,160,232, 54, 2, 0, 0,131,196, 12,133,192,
/* 0x0590 */ 2, 0, 0,131,196, 12,133,192,116, 7,106,127,232, 12, 2, 0, /* 0x0590 */ 116, 7,106,127,232, 12, 2, 0, 0,141, 4, 62,139, 93,160, 1,
/* 0x05a0 */ 0,141, 4, 62,139, 93,160, 1,195, 59, 93,156,115, 33,106, 0, /* 0x05a0 */ 195, 59, 93,156,115, 33,106, 0,106,255,104, 18, 16, 0, 0,255,
/* 0x05b0 */ 106,255,104, 18, 16, 0, 0,255,117,164, 41, 93,156,255,117,156, /* 0x05b0 */ 117,164, 41, 93,156,255,117,156, 83,232,194, 1, 0, 0,131,196,
/* 0x05c0 */ 83,232,194, 1, 0, 0,131,196, 24, 57,195,116, 30,235,203,131, /* 0x05c0 */ 24, 57,195,116, 30,235,203,131,125,192, 0,116, 22,141, 70, 3,
/* 0x05d0 */ 125,192, 0,116, 22,141, 70, 3, 37,255, 15, 0, 0,131,248, 3, /* 0x05d0 */ 37,255, 15, 0, 0,131,248, 3,119, 9, 80, 83,232,220, 1, 0,
/* 0x05e0 */ 119, 9, 80, 83,232,220, 1, 0, 0, 89, 91,139, 77,196,255, 69, /* 0x05e0 */ 0, 89, 91,139, 77,196,255, 69,168, 15,183, 65, 44,131, 69,180,
/* 0x05f0 */ 168, 15,183, 65, 44,131, 69,180, 32, 57, 69,168, 15,140, 20,254, /* 0x05f0 */ 32, 57, 69,168, 15,140, 20,254,255,255,131,125,192, 0,117, 13,
/* 0x0600 */ 255,255,131,125,192, 0,117, 13,255,117,200,232,177, 1, 0, 0, /* 0x0600 */ 255,117,200,232,177, 1, 0, 0, 90,133,192,117,133,131,125, 20,
/* 0x0610 */ 90,133,192,117,133,131,125, 20, 0,116, 8,139,117,172,139, 93, /* 0x0610 */ 0,116, 8,139,117,172,139, 93, 20,137, 51,139, 69,196,139, 64,
/* 0x0620 */ 20,137, 51,139, 69,196,139, 64, 24, 1, 69,172,139, 69,172,141, /* 0x0620 */ 24, 1, 69,172,139, 69,172,141,101,244, 91, 94, 95,201,195, 85,
/* 0x0630 */ 101,244, 91, 94, 95,201,195, 85,137,229, 87, 86, 83,131,236, 24, /* 0x0630 */ 137,229, 87, 86, 83,131,236, 24,141, 85, 24,139, 69, 8,106, 0,
/* 0x0640 */ 141, 85, 24,139, 69, 8,106, 0,139,125, 28,199, 69,232, 0, 0, /* 0x0640 */ 139,125, 28,199, 69,232, 0, 0, 0, 0,137, 69,228,139, 69, 16,
/* 0x0650 */ 0, 0,137, 69,228,139, 69, 16,139, 93, 32,199, 69,236, 0, 0, /* 0x0650 */ 139, 93, 32,199, 69,236, 0, 0, 0, 0,137, 69,224,131,192, 2,
/* 0x0660 */ 0, 0,137, 69,224,131,192, 2,255,117,224,137, 69,220,141, 69, /* 0x0660 */ 255,117,224,137, 69,220,141, 69, 32,141,119, 52,232, 4,251,255,
/* 0x0670 */ 32,141,119, 52,232, 4,251,255,255,139, 69, 12,185, 0, 16, 0, /* 0x0670 */ 255,139, 69, 12,185, 0, 16, 0, 0,186, 6, 0, 0, 0,137, 69,
/* 0x0680 */ 0,186, 6, 0, 0, 0,137, 69, 32,139, 69,228, 41, 93, 36,232, /* 0x0680 */ 32,139, 69,228, 41, 93, 36,232,198,251,255,255, 15,183, 79, 44,
/* 0x0690 */ 198,251,255,255, 15,183, 79, 44,139, 69,228,186, 5, 0, 0, 0, /* 0x0690 */ 139, 69,228,186, 5, 0, 0, 0,232,181,251,255,255, 15,183, 79,
/* 0x06a0 */ 232,181,251,255,255, 15,183, 79, 42,139, 69,228,186, 4, 0, 0, /* 0x06a0 */ 42,139, 69,228,186, 4, 0, 0, 0,232,164,251,255,255,139, 77,
/* 0x06b0 */ 0,232,164,251,255,255,139, 77, 40, 3, 78, 8,186, 3, 0, 0, /* 0x06b0 */ 40, 3, 78, 8,186, 3, 0, 0, 0,139, 69,228,131,193, 52,232,
/* 0x06c0 */ 0,139, 69,228,131,193, 52,232,142,251,255,255,141, 69,240,255, /* 0x06c0 */ 142,251,255,255,141, 69,240,255,117,220,137,250, 80,141, 69, 32,
/* 0x06d0 */ 117,220,137,250, 80,141, 69, 32,255,117,228, 80,141, 69,232, 80, /* 0x06d0 */ 255,117,228, 80,141, 69,232, 80,139, 69,224,232,152,251,255,255,
/* 0x06e0 */ 139, 69,224,232,152,251,255,255,186, 9, 0, 0, 0,137,193,137, /* 0x06e0 */ 186, 9, 0, 0, 0,137,193,137,195,139, 69,228,232, 97,251,255,
/* 0x06f0 */ 195,139, 69,228,232, 97,251,255,255,102,139, 79, 44,131,196, 28, /* 0x06f0 */ 255,102,139, 79, 44,131,196, 28, 49,210,102,133,201,116,116,131,
/* 0x0700 */ 49,210,102,133,201,116,116,131, 62, 3,117,100,106, 0,139, 69, /* 0x0700 */ 62, 3,117,100,106, 0,139, 69,240,106, 0, 3, 70, 8, 80,232,
/* 0x0710 */ 240,106, 0, 3, 70, 8, 80,232,161, 0, 0, 0,131,196, 12,133, /* 0x0710 */ 161, 0, 0, 0,131,196, 12,133,192,137,195,120, 22,104, 0, 2,
/* 0x0720 */ 192,137,195,120, 22,104, 0, 2, 0, 0, 87, 80,232,132, 0, 0, /* 0x0720 */ 0, 0, 87, 80,232,132, 0, 0, 0,131,196, 12, 61, 0, 2, 0,
/* 0x0730 */ 0,131,196, 12, 61, 0, 2, 0, 0,116, 7,106,127,232,107, 0, /* 0x0730 */ 0,116, 7,106,127,232,107, 0, 0, 0,141, 69,240,137,250,106,
/* 0x0740 */ 0, 0,141, 69,240,137,250,106, 0, 80,106, 0,141, 69,232,106, /* 0x0740 */ 0, 80,106, 0,141, 69,232,106, 0, 80,137,216,232, 39,251,255,
/* 0x0750 */ 0, 80,137,216,232, 39,251,255,255,139, 77,240,137,195,139, 69, /* 0x0750 */ 255,139, 77,240,137,195,139, 69,228,186, 7, 0, 0, 0,232,239,
/* 0x0760 */ 228,186, 7, 0, 0, 0,232,239,250,255,255,131,196, 20,235, 11, /* 0x0760 */ 250,255,255,131,196, 20,235, 11, 66, 15,183,193,131,198, 32, 57,
/* 0x0770 */ 66, 15,183,193,131,198, 32, 57,194,124,140,141,101,244,137,216, /* 0x0770 */ 194,124,140,141,101,244,137,216, 91, 94, 95,201,195, 0, 0, 0,
/* 0x0780 */ 91, 94, 95,201,195, 0, 0, 0, 85,137,229, 49,192, 80,255,117, /* 0x0780 */ 85,137,229, 49,192, 80,255,117, 28, 80,255,117, 24,255,117, 20,
/* 0x0790 */ 28, 80,255,117, 24,255,117, 20,255,117, 16,255,117, 12,255,117, /* 0x0790 */ 255,117, 16,255,117, 12,255,117, 8, 80,176,197, 80, 80,176,198,
/* 0x07a0 */ 8, 80,176,197, 80, 80,176,198,205,128,201,195,195,176, 1, 15, /* 0x07a0 */ 205,128,201,195,195,176, 1, 15,182,192,205,128,195,176, 3,235,
/* 0x07b0 */ 182,192,205,128,195,176, 3,235,246,176, 4,235,242,176, 5,235, /* 0x07b0 */ 246,176, 4,235,242,176, 5,235,238,176, 6,235,234,176, 73,235,
/* 0x07c0 */ 238,176, 6,235,234,176, 73,235,230,176, 74,235,226,176, 33,235, /* 0x07c0 */ 230,176, 74,235,226,176, 33,235,222,176, 20,235,218,176, 92,235,
/* 0x07d0 */ 222,176, 20,235,218,176, 92,235,214,176, 59,235,210,176, 2,235, /* 0x07d0 */ 214,176, 59,235,210,176, 2,235,206,176,130,235,202,176,116,235,
/* 0x07e0 */ 206,176,130,235,202,176,116,235,198,176,240,235,194,176, 10,235, /* 0x07e0 */ 198,176,240,235,194,176, 10,235,190,176, 7,235,186
/* 0x07f0 */ 190,176, 7,235,186
}; };

View File

@ -132,10 +132,13 @@ section LEXEC020
#define MAP_FIXED 0x10 #define MAP_FIXED 0x10
#define MAP_PRIVATE 0x02 #define MAP_PRIVATE 0x02
#define MAP_ANONYMOUS 0x1000 #define MAP_ANONYMOUS 0x1000
FD_MAP_ANON = -1
#define PROT_READ 1 #define PROT_READ 1
#define PROT_WRITE 2 #define PROT_WRITE 2
#define PROT_EXEC 4 #define PROT_EXEC 4
#define SYS_mmap 477 #ifndef SYS_mmap /*{*/
#define SYS_mmap 197
#endif /*}*/
#define szElf32_Ehdr 0x34 #define szElf32_Ehdr 0x34
#define p_memsz 5*4 #define p_memsz 5*4
@ -188,18 +191,19 @@ section LEXEC025
// mmap a page to hold the decompressed fold_elf86 // mmap a page to hold the decompressed fold_elf86
xor ecx, ecx // %ecx= 0 xor ecx, ecx // %ecx= 0
push ecx; push ecx // 64-bit offset push ecx; push ecx // 64-bit offset
push -1 // *BSD demands -1==fd for mmap(,,,MAP_ANON,,) push ecx // OpenBSD 4.8, NetBSD 5.1 extra arg between fd and offset?
push FD_MAP_ANON // *BSD demands -1==fd for mmap(,,,MAP_ANON,,)
push MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS push MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS
mov ch, PAGE_SIZE >> 8 // %ecx= PAGE_SIZE mov ch, PAGE_SIZE >> 8 // %ecx= PAGE_SIZE
push PROT_READ | PROT_WRITE | PROT_EXEC push PROT_READ | PROT_WRITE | PROT_EXEC
push ecx // length push ecx // length
push eax // destination push eax // destination
push eax // fake return address push edx // save &Elf32_Ehdr of this program
mov eax, SYS_mmap mov eax, SYS_mmap
int 0x80 // changes only %eax; %edx is live int 0x80 // returns eax; NetBSD clobbers edx
jb fail_mmap jb fail_mmap
xchg eax, edx // %edx= page after .text; %eax= &Elf32_Ehdr of this program xchg eax, edx // %edx= page after .text
xchg eax, ebx // %ebx= &Elf32_Ehdr of this program pop ebx; push ebx // %ebx= &Elf32_Ehdr of this program
cld cld
lodsd lodsd
@ -214,7 +218,7 @@ section LEXEC025
mov [4*3 + esp],eax mov [4*3 + esp],eax
push esi // &compressed_data push esi // &compressed_data
call ebp // decompress(&src, srclen, &dst, &dstlen, b_info.misc) call ebp // decompress(&src, srclen, &dst, &dstlen, b_info.misc)
add esp, (5+1 + 8)*4 // (5+1) args to decompress, 8 "args" to mmap add esp, (5+1 + 8+1)*4 // (5+1) args to decompress, 8+1 "args" to mmap
ret // &destination ret // &destination
main: main:

View File

@ -113,9 +113,9 @@ L50:
L53: L53:
push eax // dynbase push eax // dynbase
mov esi, [e_entry + ebx] // end of compressed data mov eax, [e_entry + ebx] // end of compressed data
lea eax, [szElf32_Ehdr + 2*szElf32_Phdr + szl_info + szp_info + ebx] // 1st &b_info mov esi, [-2*4 + eax] // length of compressed data
sub esi, eax // length of compressed data sub eax, esi // 1st &b_info
mov ebx, [ eax] // length of uncompressed ELF headers mov ebx, [ eax] // length of uncompressed ELF headers
mov ecx, [4+ eax] // length of compressed ELF headers mov ecx, [4+ eax] // length of compressed ELF headers
add ecx, szb_info add ecx, szb_info
@ -202,5 +202,55 @@ L32:
pop edi // &auxtab pop edi // &auxtab
ret ret
#ifndef DEBUG /*{*/
#define DEBUG 0
#endif /*}*/
#if DEBUG /*{ truly-PIC string constants for debugging */
.globl STR_0x
STR_0x:
call 0f; .asciz "0x"; 0:
pop eax; ret
.globl STR_hex
STR_hex:
call 0f; .asciz "0123456789abcdef"; 0:
pop eax; ret
.globl STR_xread
STR_xread:
call 0f; .asciz "xread %p(%x %p) %p %x\n"; 0:
pop eax; ret
.globl STR_unpackExtent
STR_unpackExtent:
call 0f; .asciz "unpackExtent in=%p(%x %p) out=%p(%x %p) %p %p\n"; 0:
pop eax; ret
.globl STR_make_hatch_arm
STR_make_hatch_arm:
call 0f; .asciz "make_hatch_arm %p %x\n"; 0:
pop eax; ret
.globl STR_auxv_up
STR_auxv_up:
call 0f; .asciz "auxv_up %p %x %x\n"; 0:
pop eax; ret
.globl STR_xfind_pages
STR_xfind_pages:
call 0f; .asciz "xfind_pages %x %p %d %p\n"; 0:
pop eax; ret
.globl STR_do_xmap
STR_do_xmap:
call 0f; .asciz "do_xmap fdi=%x ehdr=%p xi=%p(%x %p) av=%p p_reloc=%p f_unf=%p\n"; 0:
pop eax; ret
.globl STR_upx_main
STR_upx_main:
call 0f; .asciz "upx_main av=%p szc=%x f_dec=%p f_unf=%p xo=%p(%x %p) xi=%p(%x %p) dynbase=%x\n"; 0:
pop eax; ret
#endif /*}*/
// vi:ts=8:et:nowrap // vi:ts=8:et:nowrap

View File

@ -0,0 +1,2 @@
#define SYS_mmap 0xc5
#include "i386-bsd.elf-entry.S"

View File

@ -113,10 +113,9 @@ L50:
L53: L53:
push eax // dynbase push eax // dynbase
mov esi, [e_entry + ebx] // end of compressed data mov eax, [e_entry + ebx] // end of compressed data
mov eax, [szElf32_Ehdr + 2*szElf32_Phdr + p_memsz + ebx] // PT_NOTE.p_memsz mov esi, [-2*4 + eax] // length of compressed data
lea eax, [szElf32_Ehdr + 3*szElf32_Phdr + eax + szl_info + szp_info + ebx] // 1st &b_info sub eax, esi // 1st &b_info
sub esi, eax // length of compressed data
mov ebx, [ eax] // length of uncompressed ELF headers mov ebx, [ eax] // length of uncompressed ELF headers
mov ecx, [4+ eax] // length of compressed ELF headers mov ecx, [4+ eax] // length of compressed ELF headers
add ecx, szb_info add ecx, szb_info

View File

@ -172,7 +172,7 @@ Idx Name Size VMA LMA File off Algn Flags
167 LEXEC020 00000049 00000000 00000000 00001abe 2**0 CONTENTS, READONLY 167 LEXEC020 00000049 00000000 00000000 00001abe 2**0 CONTENTS, READONLY
168 LUNMP000 00000002 00000000 00000000 00001b07 2**0 CONTENTS, READONLY 168 LUNMP000 00000002 00000000 00000000 00001b07 2**0 CONTENTS, READONLY
169 LUNMP001 00000002 00000000 00000000 00001b09 2**0 CONTENTS, READONLY 169 LUNMP001 00000002 00000000 00000000 00001b09 2**0 CONTENTS, READONLY
170 LEXEC025 0000003e 00000000 00000000 00001b0b 2**0 CONTENTS, RELOC, READONLY 170 LEXEC025 00000040 00000000 00000000 00001b0b 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d N2BSMA10 00000000 N2BSMA10 00000000 l d N2BSMA10 00000000 N2BSMA10
00000000 l d N2BFAS11 00000000 N2BFAS11 00000000 l d N2BFAS11 00000000 N2BFAS11
@ -660,5 +660,5 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LEXEC025]: RELOCATION RECORDS FOR [LEXEC025]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
0000003a R_386_PC32 LEXEC020 0000003c R_386_PC32 LEXEC020
0000001c R_386_PC32 LEXEC020 0000001d R_386_PC32 LEXEC020

View File

@ -9,47 +9,48 @@ Linker script and memory map
TARGET(elf32-i386) TARGET(elf32-i386)
0x0000000000c01080 . = ((0xc01000 + SIZEOF_HEADERS) + 0xc) 0x0000000000c01080 . = ((0xc01000 + SIZEOF_HEADERS) + 0xc)
.text 0x0000000000c01080 0x694 .text 0x0000000000c01080 0x68c
*(.text) *(.text)
.text 0x0000000000c01080 0xcc tmp/i386-openbsd.elf-fold.o .text 0x0000000000c01080 0xc2 tmp/i386-bsd.elf-fold.o
.text 0x0000000000c0114c 0x558 tmp/i386-bsd.elf-main.o *fill* 0x0000000000c01142 0x2 00
0x0000000000c0156c upx_main .text 0x0000000000c01144 0x558 tmp/i386-bsd.elf-main.o
.text 0x0000000000c016a4 0x6d tmp/i386-bsd.syscall.o 0x0000000000c01564 upx_main
0x0000000000c0170d waitpid .text 0x0000000000c0169c 0x6d tmp/i386-bsd.syscall.o
0x0000000000c016e1 munmap 0x0000000000c01705 waitpid
0x0000000000c016f5 execve 0x0000000000c016d9 munmap
0x0000000000c016ed getpid 0x0000000000c016ed execve
0x0000000000c016fd ftruncate 0x0000000000c016e5 getpid
0x0000000000c016a4 mmap 0x0000000000c016f5 ftruncate
0x0000000000c01705 nanosleep 0x0000000000c0169c mmap
0x0000000000c016d5 write 0x0000000000c016fd nanosleep
0x0000000000c016d1 read 0x0000000000c016cd write
0x0000000000c01709 unlink 0x0000000000c016c9 read
0x0000000000c016f9 fork 0x0000000000c01701 unlink
0x0000000000c01701 gettimeofday 0x0000000000c016f1 fork
0x0000000000c016e9 access 0x0000000000c016f9 gettimeofday
0x0000000000c016c9 exit 0x0000000000c016e1 access
0x0000000000c016c8 brk 0x0000000000c016c1 exit
0x0000000000c016d9 open 0x0000000000c016c0 brk
0x0000000000c016e5 mprotect 0x0000000000c016d1 open
0x0000000000c016f1 fcntl 0x0000000000c016dd mprotect
0x0000000000c016dd close 0x0000000000c016e9 fcntl
0x0000000000c016d5 close
*(.data) *(.data)
*fill* 0x0000000000c01711 0x3 00 *fill* 0x0000000000c01709 0x3 00
.data 0x0000000000c01714 0x0 tmp/i386-openbsd.elf-fold.o .data 0x0000000000c0170c 0x0 tmp/i386-bsd.elf-fold.o
.data 0x0000000000c01714 0x0 tmp/i386-bsd.elf-main.o .data 0x0000000000c0170c 0x0 tmp/i386-bsd.elf-main.o
.data 0x0000000000c01714 0x0 tmp/i386-bsd.syscall.o .data 0x0000000000c0170c 0x0 tmp/i386-bsd.syscall.o
.data .data
.bss 0x0000000000c01714 0x0 .bss 0x0000000000c0170c 0x0
.bss 0x0000000000c01714 0x0 tmp/i386-openbsd.elf-fold.o .bss 0x0000000000c0170c 0x0 tmp/i386-bsd.elf-fold.o
.bss 0x0000000000c01714 0x0 tmp/i386-bsd.elf-main.o .bss 0x0000000000c0170c 0x0 tmp/i386-bsd.elf-main.o
.bss 0x0000000000c01714 0x0 tmp/i386-bsd.syscall.o .bss 0x0000000000c0170c 0x0 tmp/i386-bsd.syscall.o
.rel.dyn 0x0000000000c01714 0x0 .rel.dyn 0x0000000000c0170c 0x0
.rel.text 0x0000000000000000 0x0 tmp/i386-openbsd.elf-fold.o .rel.text 0x0000000000000000 0x0 tmp/i386-bsd.elf-fold.o
LOAD tmp/i386-openbsd.elf-fold.o LOAD tmp/i386-bsd.elf-fold.o
LOAD tmp/i386-bsd.elf-main.o LOAD tmp/i386-bsd.elf-main.o
LOAD tmp/i386-bsd.syscall.o LOAD tmp/i386-bsd.syscall.o
OUTPUT(tmp/i386-netbsd.elf-fold.bin elf32-i386) OUTPUT(tmp/i386-netbsd.elf-fold.bin elf32-i386)