forked from vdisasm/pe-image-for-delphi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPE.COFF.Types.pas
66 lines (47 loc) · 1.96 KB
/
PE.COFF.Types.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
unit PE.COFF.Types;
interface
type
// 4.4.1. Symbol Name Representation
TCOFFSymbolTableName = packed record
case byte of
0:
(ShortName: array [0 .. 7] of AnsiChar);
1:
(u: record Zeroes, Offset: uint32; end);
end;
// 4.4. COFF Symbol Table
TCOFFSymbolTable = packed record
Name: TCOFFSymbolTableName;
// The value that is associated with the symbol. The interpretation of this
// field depends on SectionNumber and StorageClass. A typical meaning is
// the relocatable address.
Value: uint32;
// The signed integer that identifies the section, using a one-based index
// into the section table. Some values have special meaning, as defined in
// section 5.4.2, “Section Number Values.”
SectionNumber: int16;
// A number that represents type. Microsoft tools set this field to 0x20
// (function) or 0x0 (not a function). For more information, see section
// 5.4.3, “Type Representation.”
&Type: uint16;
// An enumerated value that represents storage class. For more information,
// see section 5.4.4, “Storage Class.”
StorageClass: uint8;
// The number of auxiliary symbol table entries that follow this record.
NumberOfAuxSymbols: uint8;
end;
// 4.4.2. Section Number Values
const
// The symbol record is not yet assigned a section. A value of zero indicates
// that a reference to an external symbol is defined elsewhere. A value of
// non-zero is a common symbol with a size that is specified by the value.
IMAGE_SYM_UNDEFINED = 0;
// The symbol has an absolute (non-relocatable) value and is not an address.
IMAGE_SYM_ABSOLUTE = -1;
// The symbol provides general type or debugging information but does not
// correspond to a section. Microsoft tools use this setting along with .file
// records (storage class FILE).
IMAGE_SYM_DEBUG = -2;
// ... also other info
implementation
end.