Upx_Doxygen
https://github.com/upx/upx
p_wcle.h
1
/* p_wcle.h --
2
3
This file is part of the UPX executable compressor.
4
5
Copyright (C) 1996-2016 Markus Franz Xaver Johannes Oberhumer
6
Copyright (C) 1996-2016 Laszlo Molnar
7
All Rights Reserved.
8
9
UPX and the UCL library are free software; you can redistribute them
10
and/or modify them under the terms of the GNU General Public License as
11
published by the Free Software Foundation; either version 2 of
12
the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; see the file COPYING.
21
If not, write to the Free Software Foundation, Inc.,
22
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24
Markus F.X.J. Oberhumer Laszlo Molnar
25
<markus@oberhumer.com> <ezerotven+github@gmail.com>
26
*/
27
28
29
#ifndef __UPX_P_WCLE_H
30
#define __UPX_P_WCLE_H 1
31
32
33
/*************************************************************************
34
// watcom/le
35
**************************************************************************/
36
37
class
PackWcle
:
public
Packer
,
public
LeFile
38
{
39
typedef
Packer
super
;
40
public
:
41
PackWcle
(
InputFile
*f) : super(f),
LeFile
(f) { bele = &N_BELE_RTP::le_policy; }
42
virtual
int
getVersion()
const
{
return
13; }
43
virtual
int
getFormat()
const
{
return
UPX_F_WATCOM_LE; }
44
virtual
const
char
*getName()
const
{
return
"watcom/le"
; }
45
virtual
const
char
*getFullName(
const
options_t
*)
const
{
return
"i386-dos32.watcom.le"
; }
46
virtual
const
int
*getCompressionMethods(
int
method,
int
level)
const
;
47
virtual
const
int
*getFilters()
const
;
48
49
virtual
void
pack(
OutputFile
*fo);
50
virtual
void
unpack(
OutputFile
*fo);
51
52
virtual
bool
canPack();
53
virtual
int
canUnpack();
54
55
protected
:
56
virtual
void
handleStub(
OutputFile
*fo);
57
58
virtual
void
buildLoader(
const
Filter
*ft);
59
virtual
Linker
* newLinker()
const
;
60
61
virtual
void
readObjectTable();
62
virtual
void
encodeObjectTable();
63
virtual
void
decodeObjectTable();
64
65
virtual
void
encodeFixupPageTable();
66
virtual
void
decodeFixupPageTable();
67
68
virtual
void
encodePageMap();
69
70
virtual
void
encodeEntryTable();
71
virtual
void
decodeEntryTable();
72
73
virtual
void
preprocessFixups();
74
virtual
void
encodeFixups();
75
virtual
void
decodeFixups();
76
77
virtual
void
encodeImage(
Filter
*ft);
78
virtual
void
decodeImage();
79
80
static
void
virt2rela(
const
le_object_table_entry_t *,
unsigned
*objn,
unsigned
*addr);
81
82
// temporary copy of the object descriptors
83
MemBuffer
iobject_desc;
84
85
int
big_relocs;
86
bool
has_extra_code;
87
unsigned
neweip;
88
};
89
90
91
#endif
/* already included */
92
93
/* vim:set ts=4 sw=4 et: */
MemBuffer
Definition:
mem.h:37
ElfLinker
Definition:
linker.h:35
options_t
Definition:
options.h:45
InputFile
Definition:
file.h:89
Packer
Definition:
packer.h:115
LeFile
Definition:
lefile.h:40
OutputFile
Definition:
file.h:121
Filter
Definition:
filter.h:53
PackWcle
Definition:
p_wcle.h:37
Generated by
1.8.13