2 #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
4 #define IMAGE_SECTION_CHAR_CODE 0x00000020
5 #define IMAGE_SECTION_CHAR_DATA 0x00000040
6 #define IMAGE_SECTION_CHAR_BSS 0x00000080
7 #define IMAGE_SECTION_CHAR_NON_CACHABLE 0x04000000
8 #define IMAGE_SECTION_CHAR_NON_PAGEABLE 0x08000000
9 #define IMAGE_SECTION_CHAR_SHARED 0x10000000
10 #define IMAGE_SECTION_CHAR_EXECUTABLE 0x20000000
11 #define IMAGE_SECTION_CHAR_READABLE 0x40000000
12 #define IMAGE_SECTION_CHAR_WRITABLE 0x80000000
15 #define IMAGE_DOS_MAGIC 0x5a4d
16 #define IMAGE_PE_MAGIC 0x00004550
18 typedef struct _IMAGE_DOS_HEADER
{ // DOS .EXE header
19 WORD e_magic
; // Magic number
20 WORD e_cblp
; // Bytes on last page of file
21 WORD e_cp
; // Pages in file
22 WORD e_crlc
; // Relocations
23 WORD e_cparhdr
; // Size of header in paragraphs
24 WORD e_minalloc
; // Minimum extra paragraphs needed
25 WORD e_maxalloc
; // Maximum extra paragraphs needed
26 WORD e_ss
; // Initial (relative) SS value
27 WORD e_sp
; // Initial SP value
28 WORD e_csum
; // Checksum
29 WORD e_ip
; // Initial IP value
30 WORD e_cs
; // Initial (relative) CS value
31 WORD e_lfarlc
; // File address of relocation table
32 WORD e_ovno
; // Overlay number
33 WORD e_res
[4]; // Reserved words
34 WORD e_oemid
; // OEM identifier (for e_oeminfo)
35 WORD e_oeminfo
; // OEM information; e_oemid specific
36 WORD e_res2
[10]; // Reserved words
37 LONG e_lfanew
; // File address of new exe header
38 } IMAGE_DOS_HEADER
, *PIMAGE_DOS_HEADER
;
40 typedef struct _IMAGE_FILE_HEADER
{
42 WORD NumberOfSections
;
44 DWORD PointerToSymbolTable
;
45 DWORD NumberOfSymbols
;
46 WORD SizeOfOptionalHeader
;
48 } IMAGE_FILE_HEADER
, *PIMAGE_FILE_HEADER
;
50 #define IMAGE_SIZEOF_FILE_HEADER 20
52 #define IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
53 #define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
54 #define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
55 #define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
56 #define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
57 #define IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine.
58 #define IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file
59 #define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 // If Image is on removable media, copy and run from the swap file.
60 #define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800 // If Image is on Net, copy and run from the swap file.
61 #define IMAGE_FILE_SYSTEM 0x1000 // System File.
62 #define IMAGE_FILE_DLL 0x2000 // File is a DLL.
63 #define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 // File should only be run on a UP machine
64 #define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 // Bytes of machine word are reversed.
66 #define IMAGE_FILE_MACHINE_UNKNOWN 0
67 #define IMAGE_FILE_MACHINE_I386 0x14c // Intel 386.
68 #define IMAGE_FILE_MACHINE_R3000 0x162 // MIPS little-endian, 0x160 big-endian
69 #define IMAGE_FILE_MACHINE_R4000 0x166 // MIPS little-endian
70 #define IMAGE_FILE_MACHINE_R10000 0x168 // MIPS little-endian
71 #define IMAGE_FILE_MACHINE_ALPHA 0x184 // Alpha_AXP
72 #define IMAGE_FILE_MACHINE_POWERPC 0x1F0 // IBM PowerPC Little-Endian
79 typedef struct _IMAGE_DATA_DIRECTORY
{
82 } IMAGE_DATA_DIRECTORY
, *PIMAGE_DATA_DIRECTORY
;
84 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
87 // Optional header format.
90 typedef struct _IMAGE_OPTIONAL_HEADER
{
96 BYTE MajorLinkerVersion
;
97 BYTE MinorLinkerVersion
;
99 DWORD SizeOfInitializedData
;
100 DWORD SizeOfUninitializedData
;
101 DWORD AddressOfEntryPoint
;
106 // NT additional fields.
110 DWORD SectionAlignment
;
112 WORD MajorOperatingSystemVersion
;
113 WORD MinorOperatingSystemVersion
;
114 WORD MajorImageVersion
;
115 WORD MinorImageVersion
;
116 WORD MajorSubsystemVersion
;
117 WORD MinorSubsystemVersion
;
118 DWORD Win32VersionValue
;
123 WORD DllCharacteristics
;
124 DWORD SizeOfStackReserve
;
125 DWORD SizeOfStackCommit
;
126 DWORD SizeOfHeapReserve
;
127 DWORD SizeOfHeapCommit
;
129 DWORD NumberOfRvaAndSizes
;
130 IMAGE_DATA_DIRECTORY DataDirectory
[IMAGE_NUMBEROF_DIRECTORY_ENTRIES
];
131 } IMAGE_OPTIONAL_HEADER
, *PIMAGE_OPTIONAL_HEADER
;
133 #define IMAGE_SUBSYSTEM_UNKNOWN 0
134 #define IMAGE_SUBSYSTEM_NATIVE 1
135 #define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
136 #define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
137 #define IMAGE_SUBSYSTEM_OS2_GUI 4
138 #define IMAGE_SUBSYSTEM_OS2_CUI 5
139 #define IMAGE_SUBSYSTEM_POSIX_GUI 6
140 #define IMAGE_SUBSYSTEM_POSIX_CUI 7
141 #define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
143 typedef struct _IMAGE_NT_HEADERS
{
145 IMAGE_FILE_HEADER FileHeader
;
146 IMAGE_OPTIONAL_HEADER OptionalHeader
;
147 } IMAGE_NT_HEADERS
, *PIMAGE_NT_HEADERS
;
152 #define IMAGE_DIRECTORY_ENTRY_EXPORT 0 // Export Directory
153 #define IMAGE_DIRECTORY_ENTRY_IMPORT 1 // Import Directory
154 #define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 // Resource Directory
155 #define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 // Exception Directory
156 #define IMAGE_DIRECTORY_ENTRY_SECURITY 4 // Security Directory
157 #define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 // Base Relocation Table
158 #define IMAGE_DIRECTORY_ENTRY_DEBUG 6 // Debug Directory
159 #define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 // Description String
160 #define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 // Machine Value (MIPS GP)
161 #define IMAGE_DIRECTORY_ENTRY_TLS 9 // TLS Directory
162 #define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 // Load Configuration Directory
163 #define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11 // Bound Import Directory in headers
164 #define IMAGE_DIRECTORY_ENTRY_IAT 12 // Import Address
166 // Section header format.
169 #define IMAGE_SIZEOF_SHORT_NAME 8
171 typedef struct _IMAGE_SECTION_HEADER
{
172 BYTE Name
[IMAGE_SIZEOF_SHORT_NAME
];
174 DWORD PhysicalAddress
;
177 DWORD VirtualAddress
;
179 DWORD PointerToRawData
;
180 DWORD PointerToRelocations
;
181 DWORD PointerToLinenumbers
;
182 WORD NumberOfRelocations
;
183 WORD NumberOfLinenumbers
;
184 DWORD Characteristics
;
185 } IMAGE_SECTION_HEADER
, *PIMAGE_SECTION_HEADER
;
187 #define IMAGE_SIZEOF_SECTION_HEADER 40
189 #define IMAGE_SECTION_CODE (0x20)
190 #define IMAGE_SECTION_INITIALIZED_DATA (0x40)
191 #define IMAGE_SECTION_UNINITIALIZED_DATA (0x80)
197 typedef struct _IMAGE_EXPORT_DIRECTORY
{
198 DWORD Characteristics
;
204 DWORD NumberOfFunctions
;
206 PDWORD
*AddressOfFunctions
;
207 PDWORD
*AddressOfNames
;
208 PWORD
*AddressOfNameOrdinals
;
209 } IMAGE_EXPORT_DIRECTORY
, *PIMAGE_EXPORT_DIRECTORY
;
215 typedef struct _IMAGE_IMPORT_BY_NAME
{
218 } IMAGE_IMPORT_BY_NAME
, *PIMAGE_IMPORT_BY_NAME
;
220 #define IMAGE_ORDINAL_FLAG 0x80000000
221 #define IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
224 // Predefined resource types ... there may be some more, but I don't have
225 // the information yet. .....sang cho.....
227 #define RT_NEWRESOURCE 0x2000
228 #define RT_ERROR 0x7fff
229 #define NEWBITMAP (RT_BITMAP|RT_NEWRESOURCE)
230 #define NEWMENU (RT_MENU|RT_NEWRESOURCE)
231 #define NEWDIALOG (RT_DIALOG|RT_NEWRESOURCE)
239 // Resource directory consists of two counts, following by a variable length
240 // array of directory entries. The first count is the number of entries at
241 // beginning of the array that have actual names associated with each entry.
242 // The entries are in ascending order, case insensitive strings. The second
243 // count is the number of entries that immediately follow the named entries.
244 // This second count identifies the number of entries that have 16-bit integer
245 // Ids as their name. These entries are also sorted in ascending order.
247 // This structure allows fast lookup by either name or number, but for any
248 // given resource entry only one form of lookup is supported, not both.
249 // This is consistant with the syntax of the .RC file and the .RES file.
254 // Each directory contains the 32-bit Name of the entry and an offset,
255 // relative to the beginning of the resource directory of the data associated
256 // with this directory entry. If the name of the entry is an actual text
257 // string instead of an integer Id, then the high order bit of the name field
258 // is set to one and the low order 31-bits are an offset, relative to the
259 // beginning of the resource directory of the string, which is of type
260 // IMAGE_RESOURCE_DIRECTORY_STRING. Otherwise the high bit is clear and the
261 // low-order 16-bits are the integer Id that identify this resource directory
262 // entry. If the directory entry is yet another resource directory (i.e. a
263 // subdirectory), then the high order bit of the offset field will be
264 // set to indicate this. Otherwise the high bit is clear and the offset
265 // field points to a resource data entry.
268 typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY
{
271 } IMAGE_RESOURCE_DIRECTORY_ENTRY
, *PIMAGE_RESOURCE_DIRECTORY_ENTRY
;
274 typedef struct _IMAGE_RESOURCE_DIRECTORY
{
275 DWORD Characteristics
;
279 WORD NumberOfNamedEntries
;
280 WORD NumberOfIdEntries
;
281 IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries
[0];
282 } IMAGE_RESOURCE_DIRECTORY
, *PIMAGE_RESOURCE_DIRECTORY
;
284 #define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000
285 #define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000
290 // For resource directory entries that have actual string names, the Name
291 // field of the directory entry points to an object of the following type.
292 // All of these string objects are stored together after the last resource
293 // directory entry and before the first resource data object. This minimizes
294 // the impact of these variable length objects on the alignment of the fixed
295 // size directory entry objects.
298 typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING
{
300 CHAR NameString
[ 1 ];
301 } IMAGE_RESOURCE_DIRECTORY_STRING
, *PIMAGE_RESOURCE_DIRECTORY_STRING
;
304 typedef struct _IMAGE_RESOURCE_DIR_STRING_U
{
306 WCHAR NameString
[ 1 ];
307 } IMAGE_RESOURCE_DIR_STRING_U
, *PIMAGE_RESOURCE_DIR_STRING_U
;
311 // Each resource data entry describes a leaf node in the resource directory
312 // tree. It contains an offset, relative to the beginning of the resource
313 // directory of the data for the resource, a size field that gives the number
314 // of bytes of data at that offset, a CodePage that should be used when
315 // decoding code point values within the resource data. Typically for new
316 // applications the code page would be the unicode code page.
319 typedef struct _IMAGE_RESOURCE_DATA_ENTRY
{
324 } IMAGE_RESOURCE_DATA_ENTRY
, *PIMAGE_RESOURCE_DATA_ENTRY
;
327 // Menu Resources ... added by .....sang cho....
329 // Menu resources are composed of a menu header followed by a sequential list
330 // of menu items. There are two types of menu items: pop-ups and normal menu
331 // itmes. The MENUITEM SEPARATOR is a special case of a normal menu item with
332 // an empty name, zero ID, and zero flags.
334 typedef struct _IMAGE_MENU_HEADER
{
335 WORD wVersion
; // Currently zero
336 WORD cbHeaderSize
; // Also zero
337 } IMAGE_MENU_HEADER
, *PIMAGE_MENU_HEADER
;
339 typedef struct _IMAGE_POPUP_MENU_ITEM
{
342 } IMAGE_POPUP_MENU_ITEM
, *PIMAGE_POPUP_MENU_ITEM
;
344 typedef struct _IMAGE_NORMAL_MENU_ITEM
{
348 } IMAGE_NORMAL_MENU_ITEM
, *PIMAGE_NORMAL_MENU_ITEM
;
350 #define MI_GRAYED 0x0001 // GRAYED keyword
351 #define MI_INACTIVE 0x0002 // INACTIVE keyword
352 #define MI_BITMAP 0x0004 // BITMAP keyword
353 #define MI_OWNERDRAW 0x0100 // OWNERDRAW keyword
354 #define MI_CHECKED 0x0008 // CHECKED keyword
355 #define MI_POPUP 0x0010 // used internally
356 #define MI_MENUBARBREAK 0x0020 // MENUBARBREAK keyword
357 #define MI_MENUBREAK 0x0040 // MENUBREAK keyword
358 #define MI_ENDMENU 0x0080 // used internally
360 // Dialog Box Resources .................. added by sang cho.
362 // A dialog box is contained in a single resource and has a header and
363 // a portion repeated for each control in the dialog box.
364 // The item DWORD IStyle is a standard window style composed of flags found
366 // The default style for a dialog box is:
367 // WS_POPUP | WS_BORDER | WS_SYSMENU
369 // The itme marked "Name or Ordinal" are :
370 // If the first word is an 0xffff, the next two bytes contain an ordinal ID.
371 // Otherwise, the first one or more WORDS contain a double-null-terminated string.
372 // An empty string is represented by a single WORD zero in the first location.
374 // The WORD wPointSize and WCHAR szFontName entries are present if the FONT
375 // statement was included for the dialog box. This can be detected by checking
376 // the entry IStyle. If IStyle & DS_SETFONT ( which is 0x40), then these
377 // entries will be present.
379 typedef struct _IMAGE_DIALOG_BOX_HEADER1
{
381 DWORD IExtendedStyle
; // New for Windows NT
382 WORD nControls
; // Number of Controls
387 // N_OR_O MenuName; // Name or Ordinal ID
388 // N_OR_O ClassName; // Name or Ordinal ID
389 // WCHAR szCaption[];
390 // WORD wPointSize; // Only here if FONT set for dialog
391 // WCHAR szFontName[]; // This too
392 } IMAGE_DIALOG_HEADER
, *PIMAGE_DIALOG_HEADER
;
394 typedef union _NAME_OR_ORDINAL
{ // Name or Ordinal ID
400 } NAME_OR_ORDINAL
, *PNAME_OR_ORDINAL
;
402 // The data for each control starts on a DWORD boundary (which may require
403 // some padding from the previous control), and its format is as follows:
405 typedef struct _IMAGE_CONTROL_DATA
{
407 DWORD IExtendedStyle
;
416 } IMAGE_CONTROL_DATA
, *PIMAGE_CONTROL_DATA
;
422 #define SCROLLBAR 0x84
423 #define COMBOBOX 0x85
425 // The various statements used in a dialog script are all mapped to these
426 // classes along with certain modifying styles. The values for these styles
427 // can be found in WINDOWS.H. All dialog controls have the default styles
428 // of WS_CHILD and WS_VISIBLE. A list of the default styles used follows:
430 // Statement Default Class Default Styles
431 // CONTROL None WS_CHILD|WS_VISIBLE
432 // LTEXT STATIC ES_LEFT
433 // RTEXT STATIC ES_RIGHT
434 // CTEXT STATIC ES_CENTER
435 // LISTBOX LISTBOX WS_BORDER|LBS_NOTIFY
436 // CHECKBOX BUTTON BS_CHECKBOX|WS_TABSTOP
437 // PUSHBUTTON BUTTON BS_PUSHBUTTON|WS_TABSTOP
438 // GROUPBOX BUTTON BS_GROUPBOX
439 // DEFPUSHBUTTON BUTTON BS_DFPUSHBUTTON|WS_TABSTOP
440 // RADIOBUTTON BUTTON BS_RADIOBUTTON
441 // AUTOCHECKBOX BUTTON BS_AUTOCHECKBOX
442 // AUTO3STATE BUTTON BS_AUTO3STATE
443 // AUTORADIOBUTTON BUTTON BS_AUTORADIOBUTTON
444 // PUSHBOX BUTTON BS_PUSHBOX
445 // STATE3 BUTTON BS_3STATE
446 // EDITTEXT EDIT ES_LEFT|WS_BORDER|WS_TABSTOP
447 // COMBOBOX COMBOBOX None
448 // ICON STATIC SS_ICON
449 // SCROLLBAR SCROLLBAR None
456 typedef struct _IMAGE_DEBUG_DIRECTORY
{
457 DWORD Characteristics
;
463 DWORD AddressOfRawData
;
464 DWORD PointerToRawData
;
465 } IMAGE_DEBUG_DIRECTORY
, *PIMAGE_DEBUG_DIRECTORY
;
467 #define IMAGE_DEBUG_TYPE_UNKNOWN 0
468 #define IMAGE_DEBUG_TYPE_COFF 1
469 #define IMAGE_DEBUG_TYPE_CODEVIEW 2
470 #define IMAGE_DEBUG_TYPE_FPO 3
471 #define IMAGE_DEBUG_TYPE_MISC 4
472 #define IMAGE_DEBUG_TYPE_EXCEPTION 5
473 #define IMAGE_DEBUG_TYPE_FIXUP 6
474 #define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
475 #define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
478 typedef struct _IMAGE_DEBUG_MISC
{
479 DWORD DataType
; // type of misc data, see defines
480 DWORD Length
; // total length of record, rounded to four
482 BOOL Unicode
; // TRUE if data is unicode string
484 BYTE Data
[ 1 ]; // Actual data
485 } IMAGE_DEBUG_MISC
, *PIMAGE_DEBUG_MISC
;
489 // Debugging information can be stripped from an image file and placed
490 // in a separate .DBG file, whose file name part is the same as the
491 // image file name part (e.g. symbols for CMD.EXE could be stripped
492 // and placed in CMD.DBG). This is indicated by the IMAGE_FILE_DEBUG_STRIPPED
493 // flag in the Characteristics field of the file header. The beginning of
494 // the .DBG file contains the following structure which captures certain
495 // information from the image file. This allows a debug to proceed even if
496 // the original image file is not accessable. This header is followed by
497 // zero of more IMAGE_SECTION_HEADER structures, followed by zero or more
498 // IMAGE_DEBUG_DIRECTORY structures. The latter structures and those in
499 // the image file contain file offsets relative to the beginning of the
502 // If symbols have been stripped from an image, the IMAGE_DEBUG_MISC structure
503 // is left in the image file, but not mapped. This allows a debugger to
504 // compute the name of the .DBG file, from the name of the image in the
505 // IMAGE_DEBUG_MISC structure.
508 typedef struct _IMAGE_SEPARATE_DEBUG_HEADER
{
512 WORD Characteristics
;
517 DWORD NumberOfSections
;
518 DWORD ExportedNamesSize
;
519 DWORD DebugDirectorySize
;
520 DWORD SectionAlignment
;
522 } IMAGE_SEPARATE_DEBUG_HEADER
, *PIMAGE_SEPARATE_DEBUG_HEADER
;
524 #define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944
526 #define IMAGE_SEPARATE_DEBUG_FLAGS_MASK 0x8000
527 #define IMAGE_SEPARATE_DEBUG_MISMATCH 0x8000 // when DBG was updated, the
528 // old checksum didn't match.
534 #define SIZE_OF_NT_SIGNATURE sizeof (DWORD)
535 #define MAXRESOURCENAME 13
537 /* global macros to define header offsets into file */
538 /* offset to PE file signature */
539 #define NTSIGNATURE(a) ((LPVOID)((BYTE *)a + \
540 ((PIMAGE_DOS_HEADER)a)->e_lfanew))
542 /* DOS header identifies the NT PEFile signature dword
543 the PEFILE header exists just after that dword */
544 #define PEFHDROFFSET(a) ((LPVOID)((BYTE *)a + \
545 ((PIMAGE_DOS_HEADER)a)->e_lfanew + \
546 SIZE_OF_NT_SIGNATURE))
548 /* PE optional header is immediately after PEFile header */
549 #define OPTHDROFFSET(a) ((LPVOID)((BYTE *)a + \
550 ((PIMAGE_DOS_HEADER)a)->e_lfanew + \
551 SIZE_OF_NT_SIGNATURE + \
552 sizeof (IMAGE_FILE_HEADER)))
554 /* section headers are immediately after PE optional header */
555 #define SECHDROFFSET(a) ((LPVOID)((BYTE *)a + \
556 ((PIMAGE_DOS_HEADER)a)->e_lfanew + \
557 SIZE_OF_NT_SIGNATURE + \
558 sizeof (IMAGE_FILE_HEADER) + \
559 sizeof (IMAGE_OPTIONAL_HEADER)))
561 #define MakePtr( cast, ptr, addValue ) (cast)( (DWORD)(ptr) + (DWORD)(addValue))
563 typedef struct _IMAGE_IMPORT_MODULE_DIRECTORY
565 DWORD dwRVAFunctionNameList
;
568 DWORD dwRVAModuleName
;
569 DWORD dwRVAFunctionAddressList
;
570 } IMAGE_IMPORT_MODULE_DIRECTORY
, *PIMAGE_IMPORT_MODULE_DIRECTORY
;
572 typedef struct _RELOCATION_DIRECTORY
574 DWORD VirtualAddress
; /* adresse virtuelle du bloc ou se font les relocations */
575 DWORD SizeOfBlock
; // taille de cette structure + des structures
576 // relocation_entry qui suivent (ces dernieres sont
577 // donc au nombre de (SizeOfBlock-8)/2
578 } RELOCATION_DIRECTORY
, *PRELOCATION_DIRECTORY
;
580 typedef struct _RELOCATION_ENTRY
583 // (TypeOffset >> 12) est le type
584 // (TypeOffset&0xfff) est l'offset dans le bloc
585 } RELOCATION_ENTRY
, *PRELOCATION_ENTRY
;
587 #define TYPE_RELOC_ABSOLUTE 0
588 #define TYPE_RELOC_HIGH 1
589 #define TYPE_RELOC_LOW 2
590 #define TYPE_RELOC_HIGHLOW 3
591 #define TYPE_RELOC_HIGHADJ 4
592 #define TYPE_RELOC_MIPS_JMPADDR 5