Rizin
unix-like reverse engineering framework and cli tools
omf_specs.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2015 ampotos <mercie_i@epitech.eu>
2 // SPDX-FileCopyrightText: 2015-2019 pancake <pancake@nopcode.org>
3 // SPDX-License-Identifier: LGPL-3.0-only
4 
5 #ifndef OMF_SPECS_H_
6 #define OMF_SPECS_H_
7 
8 // additional information : http://pierrelib.pagesperso-orange.fr/exec_formats/OMF_v1.1.pdf
9 
10 // record type
11 #define OMF_THEADR 0x80 // Translator Header Record
12 #define OMF_LHEADR 0x82 // Library Module Header Record
13 #define OMF_COMENT 0x88 // Comment Record (Including all comment class extensions)
14 #define OMF_MODEND 0x8A // Module End Record 16 bits
15 #define OMF_MODEND32 0x8B // Module End Record 32 bits
16 #define OMF_EXTDEF 0x8C // External Names Definition Record
17 #define OMF_PUBDEF 0x90 // Public Names Definition Record 16 bits
18 #define OMF_PUBDEF32 0x91 // Public Names Definition Record 32 bits
19 #define OMF_LINNUM 0x94 // Line Numbers Record 16 bits
20 #define OMF_LINNUM32 0x95 // Line Numbers Record 32 bits
21 #define OMF_LNAMES 0x96 // List of Names Record
22 #define OMF_SEGDEF 0x98 // Segment Definition Record bits 16
23 #define OMF_SEGDEF32 0x99 // Segment Definition Record bits 32
24 #define OMF_GRPDEF 0x9A // Group Definition Record
25 #define OMF_FIXUPP 0x9C // Fixup Record 16 bits
26 #define OMF_FIXUPP32 0x9D // Fixup Record 32 bits
27 #define OMF_LEDATA 0xA0 // Logical Enumerated Data Record 16 bits
28 #define OMF_LEDATA32 0xA1 // Logical Enumerated Data Record 32 bits
29 #define OMF_LIDATA 0xA2 // Logical Iterated Data Record 16 bits
30 #define OMF_LIDATA32 0xA3 // Logical Iterated Data Record 32 bits
31 #define OMF_COMDEF 0xB0 // Communal Names Definition Record
32 #define OMF_BAKPAT 0xB2 // Backpatch Record 16 bits
33 #define OMF_BAKPAT32 0xB3 // Backpatch Record 32 bits
34 #define OMF_LEXTDEF 0xB4 // Local External Names Definition Record
35 #define OMF_LPUBDEF 0xB6 // Local Public Names Definition Record 16 bits
36 #define OMF_LPUBDEF32 0xB7 // Local Public Names Definition Record 32 bits
37 #define OMF_LCOMDEF 0xB8 // Local Communal Names Definition Record
38 #define OMF_CEXTDEF 0xBC // COMDAT External Names Definition Record
39 #define OMF_COMDAT 0xC2 // Initialized Communal Data Record 16 bits
40 #define OMF_COMDAT32 0xC3 // Initialized Communal Data Record 32 bits
41 #define OMF_LINSYM 0xC4 // Symbol Line Numbers Record 16 bits
42 #define OMF_LINSYM32 0xC5 // Symbol Line Numbers Record 32 bits
43 #define OMF_ALIAS 0xC6 // Alias Definition Record
44 #define OMF_NBKPAT 0xC8 // Named Backpatch Record 16 bits
45 #define OMF_NBKPAT32 0xC9 // Named Backpatch Record 32 bits
46 #define OMF_LLNAMES 0xCA // Local Logical Names Definition Record
47 #define OMF_VERNUM 0xCC // OMF Version Number Record
48 #define OMF_VENDEXT 0xCE // Vendor-specific OMF Extension Record
49 
50 // comment type
51 #define OMF_COMENT_EXT 0xA0 // OMF extensions
52 #define OMF_COMENT_NEW_EXT 0xA1 // OMF new extensions
53 #define OMF_COMENT_LINK_SEP 0xA2 // Link Pass Separator
54 #define OMF_COMENT_LIBMOD 0xA3 // Library module comment record
55 #define OMF_COMENT_EXESTR 0xA4 // executable string
56 #define OMF_COMENT_INCERR 0xA6 // Incremental compilation error
57 #define OMF_COMENT_NOPAD 0xA7 // No segment padding
58 #define OMF_COMENT_WKEXT 0xA8 // Weak Extern record
59 #define OMF_COMENT_LZEXT 0xA9 // Lazy Extern record
60 #define OMF_COMENT_COMMENT 0xDA // random comment
61 #define OMF_COMENT_COMPIL 0xDB // compiler comment (version number)
62 #define OMF_COMENT_DATE 0xDC // date
63 #define OMF_COMENT_TIMESTAMP 0xDD // timestamp
64 #define OMF_COMENT_USER 0xDF // user's comment
65 #define OMF_COMENT_DEP_FILE 0xE9 // Borland : Show include file needed for building
66 #define OMF_COMENT_CMD_LINE 0xFF // Microsoft QuickC : Shows the compiler options chosen
67 
68 // comment extensions subtype
69 #define OMF_COMENT_EXT_IMPDEF 0x01 // Import definition record
70 #define OMF_COMENT_EXT_EXPDEF 0x02 // Export definition record
71 #define OMF_COMENT_EXT_INCDEF 0x03 // Incremental compilation record
72 #define OMF_COMENT_EXT_PMEM_LIB 0x04 // Protect loading for 32 bits library
73 #define OMF_COMENT_EXT_LNKDIR 0x05 // Microsoft C++ linker directives record
74 #define OMF_COMENT_EXT_BIG_E 0x06 // Target machine is big endian
75 
76 typedef struct {
79  void *content;
81 } OMF_record;
82 
83 #endif
uint16_t ut16
uint8_t ut8
Definition: lh5801.h:11
ut16 size
Definition: omf_specs.h:78
void * content
Definition: omf_specs.h:79
ut8 type
Definition: omf_specs.h:77
ut8 checksum
Definition: omf_specs.h:80