32 #ifndef __UPX_P_LX_EXC_H 33 #define __UPX_P_LX_EXC_H 1 45 virtual void generateElfHdr(
50 virtual int getFormat()
const {
return UPX_F_LINUX_i386; }
51 virtual const char *getName()
const {
return "linux.exec/i386"; }
52 virtual const char *getFullName(
const options_t *)
const {
return "i386-linux.elf.execve"; }
53 virtual const int *getCompressionMethods(
int method,
int level)
const;
54 virtual const int *getFilters()
const;
55 virtual void buildLoader(
const Filter *);
57 virtual bool canPack();
66 virtual Linker* newLinker()
const;
67 virtual int getLoaderPrefixSize()
const;
68 virtual void buildLinuxLoader(
69 upx_byte
const *
const proto,
70 unsigned const szproto,
71 upx_byte
const *
const fold,
72 unsigned const szfold,
77 virtual void patchLoader();
78 virtual void patchLoaderChecksum();
82 virtual int checkEhdr(
const Elf_LE32_Ehdr *ehdr)
const;
85 UPX_ELF_MAGIC = 0x5850557f
90 __packed_struct(cprElfHdr1)
92 Elf_LE32_Phdr phdr[1];
96 __packed_struct(cprElfHdr2)
98 Elf_LE32_Phdr phdr[2];
100 __packed_struct_end()
102 __packed_struct(cprElfHdr3)
104 Elf_LE32_Phdr phdr[3];
106 __packed_struct_end()
114 char text[0x18 - 4*4];
118 unsigned char ei_osabi;
119 char const *osabi_note;
121 static void compileTimeAssertions() {
122 COMPILE_TIME_ASSERT(
sizeof(cprElfHdr1) == 52 + 1*32 + 12)
123 COMPILE_TIME_ASSERT(
sizeof(cprElfHdr2) == 52 + 2*32 + 12)
124 COMPILE_TIME_ASSERT(
sizeof(cprElfHdr3) == 52 + 3*32 + 12)
125 COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr1)
126 COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr2)
127 COMPILE_TIME_ASSERT_ALIGNED1(cprElfHdr3)
137 virtual int getFormat()
const {
return UPX_F_BSD_i386; }
138 virtual const char *getName()
const {
return "bsd.exec/i386"; }
139 virtual const char *getFullName(
const options_t *)
const {
return "i386-bsd.elf.execve"; }
144 virtual void buildLoader(
const Filter *);
Definition: p_lx_exc.h:132
Definition: p_lx_exc.h:40
Definition: p_lx_exc.h:110