Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

coff_s.h File Reference

#include "global.h"
#include "tools.h"

Go to the source code of this file.

Classes

struct  COFF_HEADER
struct  COFF_OPTIONAL_HEADER32
struct  COFF_OPTIONAL_HEADER64
struct  COFF_SECTION_HEADER

Defines

#define COFF_RELOCS_STRIPPED   0x0001
#define COFF_EXECUTABLE_IMAGE   0x0002
#define COFF_LINE_NUMS_STRIPPED   0x0004
#define COFF_LOCAL_SYMS_STRIPPED   0x0008
#define COFF_AGGRESIVE_WS_TRIM   0x0010
#define COFF_BYTES_REVERSED_LO   0x0080
#define COFF_32BIT_MACHINE   0x0100
#define COFF_DEBUG_STRIPPED   0x0200
#define COFF_REMOVABLE_RUN_FROM_SWAP   0x0400
#define COFF_NET_RUN_FROM_SWAP   0x0800
#define COFF_SYSTEM   0x1000
#define COFF_DLL   0x2000
#define COFF_UP_SYSTEM_ONLY   0x4000
#define COFF_BYTES_REVERSED_HI   0x8000
#define COFF_MACHINE_UNKNOWN   0
#define COFF_MACHINE_I386   0x14c
#define COFF_MACHINE_I486   0x14d
#define COFF_MACHINE_I586   0x14e
#define COFF_MACHINE_R3000BE   0x160
#define COFF_MACHINE_R3000   0x162
#define COFF_MACHINE_R4000   0x166
#define COFF_MACHINE_R10000   0x168
#define COFF_MACHINE_ALPHA   0x184
#define COFF_MACHINE_SH3   0x1a2
#define COFF_MACHINE_SH4   0x1a6
#define COFF_MACHINE_ARM   0x1c0
#define COFF_MACHINE_THUMB   0x1c2
#define COFF_MACHINE_POWERPC_BE   0x1df
#define COFF_MACHINE_POWERPC_LE   0x1f0
#define COFF_MACHINE_IA64   0x200
#define COFF_MACHINE_MIPS16   0x266
#define COFF_MACHINE_68k   0x268
#define COFF_MACHINE_ALPHA_AXP_64   0x284
#define COFF_MACHINE_MIPSf   0x366
#define COFF_MACHINE_MIPS16f   0x466
#define COFF_MACHINE_AMD_HAMMER   0x8664
#define COFF_OPTSIZE_0   0x00
#define COFF_OPTSIZE_COFF32   0x1c
#define COFF_OPTSIZE_XCOFF32   0x48
#define COFF_OPTSIZE_PE32   0xe0
#define COFF_OPTMAGIC_ROMIMAGE   0x107
#define COFF_OPTMAGIC_PE32   0x10b
#define COFF_OPTMAGIC_COFF32   0x10b
#define COFF_OPTMAGIC_PE64   0x20b
#define COFF_SIZEOF_SHORT_NAME   8
#define COFF_SIZEOF_SECTION_HEADER   40
#define COFF_SCN_TYPE_NO_PAD   0x00000008
#define COFF_SCN_CNT_CODE   0x00000020
#define COFF_SCN_CNT_INITIALIZED_DATA   0x00000040
#define COFF_SCN_CNT_UNINITIALIZED_DATA   0x00000080
#define COFF_SCN_LNK_OTHER   0x00000100
#define COFF_SCN_LNK_INFO   0x00000200
#define COFF_SCN_LNK_REMOVE   0x00000800
#define COFF_SCN_LNK_COMDAT   0x00001000
#define COFF_SCN_MEM_FARDATA   0x00008000
#define COFF_SCN_MEM_PURGEABLE   0x00020000
#define COFF_SCN_MEM_16BIT   0x00020000
#define COFF_SCN_MEM_LOCKED   0x00040000
#define COFF_SCN_MEM_PRELOAD   0x00080000
#define COFF_SCN_ALIGN_1BYTES   0x00100000
#define COFF_SCN_ALIGN_2BYTES   0x00200000
#define COFF_SCN_ALIGN_4BYTES   0x00300000
#define COFF_SCN_ALIGN_8BYTES   0x00400000
#define COFF_SCN_ALIGN_16BYTES   0x00500000
#define COFF_SCN_ALIGN_32BYTES   0x00600000
#define COFF_SCN_ALIGN_64BYTES   0x00700000
#define COFF_SCN_LNK_NRELOC_OVFL   0x01000000
#define COFF_SCN_MEM_DISCARDABLE   0x02000000
#define COFF_SCN_MEM_NOT_CACHED   0x04000000
#define COFF_SCN_MEM_NOT_PAGED   0x08000000
#define COFF_SCN_MEM_SHARED   0x10000000
#define COFF_SCN_MEM_EXECUTE   0x20000000
#define COFF_SCN_MEM_READ   0x40000000
#define COFF_SCN_MEM_WRITE   0x80000000

Typedefs

typedef unsigned int RVA

Variables

byte COFF_HEADER_struct []
byte COFF_OPTIONAL_HEADER32_struct []
byte COFF_OPTIONAL_HEADER64_struct []
byte COFF_SECTION_HEADER_struct []


Define Documentation

#define COFF_32BIT_MACHINE   0x0100
 

Definition at line 45 of file coff_s.h.

#define COFF_AGGRESIVE_WS_TRIM   0x0010
 

Definition at line 43 of file coff_s.h.

#define COFF_BYTES_REVERSED_HI   0x8000
 

Definition at line 52 of file coff_s.h.

#define COFF_BYTES_REVERSED_LO   0x0080
 

Definition at line 44 of file coff_s.h.

#define COFF_DEBUG_STRIPPED   0x0200
 

Definition at line 46 of file coff_s.h.

#define COFF_DLL   0x2000
 

Definition at line 50 of file coff_s.h.

Referenced by PEAnalyser::beginAnalysis(), and CoffAnalyser::beginAnalysis().

#define COFF_EXECUTABLE_IMAGE   0x0002
 

Definition at line 40 of file coff_s.h.

#define COFF_LINE_NUMS_STRIPPED   0x0004
 

Definition at line 41 of file coff_s.h.

#define COFF_LOCAL_SYMS_STRIPPED   0x0008
 

Definition at line 42 of file coff_s.h.

#define COFF_MACHINE_68k   0x268
 

Definition at line 71 of file coff_s.h.

#define COFF_MACHINE_ALPHA   0x184
 

Definition at line 62 of file coff_s.h.

Referenced by PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_ALPHA_AXP_64   0x284
 

Definition at line 72 of file coff_s.h.

#define COFF_MACHINE_AMD_HAMMER   0x8664
 

Definition at line 75 of file coff_s.h.

#define COFF_MACHINE_ARM   0x1c0
 

Definition at line 65 of file coff_s.h.

#define COFF_MACHINE_I386   0x14c
 

Definition at line 55 of file coff_s.h.

Referenced by PEAnalyser::createAddress(), CoffAnalyser::createAddress(), PEAnalyser::createAddress32(), CoffAnalyser::createAddress32(), PEAnalyser::createAssembler(), CoffAnalyser::createAssembler(), PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_I486   0x14d
 

Definition at line 56 of file coff_s.h.

Referenced by PEAnalyser::createAddress(), CoffAnalyser::createAddress(), PEAnalyser::createAddress32(), CoffAnalyser::createAddress32(), PEAnalyser::createAssembler(), CoffAnalyser::createAssembler(), PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_I586   0x14e
 

Definition at line 57 of file coff_s.h.

Referenced by PEAnalyser::createAddress(), CoffAnalyser::createAddress(), PEAnalyser::createAddress32(), CoffAnalyser::createAddress32(), PEAnalyser::createAssembler(), CoffAnalyser::createAssembler(), PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_IA64   0x200
 

Definition at line 69 of file coff_s.h.

Referenced by PEAnalyser::initUnasm().

#define COFF_MACHINE_MIPS16   0x266
 

Definition at line 70 of file coff_s.h.

#define COFF_MACHINE_MIPS16f   0x466
 

Definition at line 74 of file coff_s.h.

#define COFF_MACHINE_MIPSf   0x366
 

Definition at line 73 of file coff_s.h.

#define COFF_MACHINE_POWERPC_BE   0x1df
 

Definition at line 67 of file coff_s.h.

Referenced by PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_POWERPC_LE   0x1f0
 

Definition at line 68 of file coff_s.h.

Referenced by PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_R10000   0x168
 

Definition at line 61 of file coff_s.h.

Referenced by PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_R3000   0x162
 

Definition at line 59 of file coff_s.h.

Referenced by PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_R3000BE   0x160
 

Definition at line 58 of file coff_s.h.

#define COFF_MACHINE_R4000   0x166
 

Definition at line 60 of file coff_s.h.

Referenced by PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_MACHINE_SH3   0x1a2
 

Definition at line 63 of file coff_s.h.

#define COFF_MACHINE_SH4   0x1a6
 

Definition at line 64 of file coff_s.h.

#define COFF_MACHINE_THUMB   0x1c2
 

Definition at line 66 of file coff_s.h.

#define COFF_MACHINE_UNKNOWN   0
 

Definition at line 54 of file coff_s.h.

Referenced by PEAnalyser::initUnasm(), and CoffAnalyser::initUnasm().

#define COFF_NET_RUN_FROM_SWAP   0x0800
 

Definition at line 48 of file coff_s.h.

#define COFF_OPTMAGIC_COFF32   0x10b
 

Definition at line 95 of file coff_s.h.

Referenced by ht_coff::init().

#define COFF_OPTMAGIC_PE32   0x10b
 

Definition at line 94 of file coff_s.h.

Referenced by PEAnalyser::beginAnalysis(), PEAnalyser::fileofsToAddress(), ht_pe::init(), ht_pe_header_viewer::ref_sel(), ht_pe_import_viewer::select_entry(), ht_pe_export_viewer::select_entry(), and ht_pe_dimport_viewer::select_entry().

#define COFF_OPTMAGIC_PE64   0x20b
 

Definition at line 97 of file coff_s.h.

Referenced by PEAnalyser::createAddress(), ht_pe::init(), and PEAnalyser::initUnasm().

#define COFF_OPTMAGIC_ROMIMAGE   0x107
 

Definition at line 92 of file coff_s.h.

#define COFF_OPTSIZE_0   0x00
 

Definition at line 84 of file coff_s.h.

#define COFF_OPTSIZE_COFF32   0x1c
 

Definition at line 86 of file coff_s.h.

#define COFF_OPTSIZE_PE32   0xe0
 

Definition at line 89 of file coff_s.h.

#define COFF_OPTSIZE_XCOFF32   0x48
 

Definition at line 87 of file coff_s.h.

#define COFF_RELOCS_STRIPPED   0x0001
 

Definition at line 39 of file coff_s.h.

#define COFF_REMOVABLE_RUN_FROM_SWAP   0x0400
 

Definition at line 47 of file coff_s.h.

#define COFF_SCN_ALIGN_16BYTES   0x00500000
 

Definition at line 180 of file coff_s.h.

#define COFF_SCN_ALIGN_1BYTES   0x00100000
 

Definition at line 176 of file coff_s.h.

#define COFF_SCN_ALIGN_2BYTES   0x00200000
 

Definition at line 177 of file coff_s.h.

#define COFF_SCN_ALIGN_32BYTES   0x00600000
 

Definition at line 181 of file coff_s.h.

#define COFF_SCN_ALIGN_4BYTES   0x00300000
 

Definition at line 178 of file coff_s.h.

#define COFF_SCN_ALIGN_64BYTES   0x00700000
 

Definition at line 182 of file coff_s.h.

#define COFF_SCN_ALIGN_8BYTES   0x00400000
 

Definition at line 179 of file coff_s.h.

#define COFF_SCN_CNT_CODE   0x00000020
 

Definition at line 157 of file coff_s.h.

Referenced by PEAnalyser::validAddress(), and CoffAnalyser::validAddress().

#define COFF_SCN_CNT_INITIALIZED_DATA   0x00000040
 

Definition at line 158 of file coff_s.h.

#define COFF_SCN_CNT_UNINITIALIZED_DATA   0x00000080
 

Definition at line 159 of file coff_s.h.

Referenced by CoffAnalyser::validAddress().

#define COFF_SCN_LNK_COMDAT   0x00001000
 

Definition at line 165 of file coff_s.h.

#define COFF_SCN_LNK_INFO   0x00000200
 

Definition at line 162 of file coff_s.h.

#define COFF_SCN_LNK_NRELOC_OVFL   0x01000000
 

Definition at line 185 of file coff_s.h.

#define COFF_SCN_LNK_OTHER   0x00000100
 

Definition at line 161 of file coff_s.h.

#define COFF_SCN_LNK_REMOVE   0x00000800
 

Definition at line 164 of file coff_s.h.

#define COFF_SCN_MEM_16BIT   0x00020000
 

Definition at line 172 of file coff_s.h.

#define COFF_SCN_MEM_DISCARDABLE   0x02000000
 

Definition at line 186 of file coff_s.h.

#define COFF_SCN_MEM_EXECUTE   0x20000000
 

Definition at line 190 of file coff_s.h.

Referenced by PEAnalyser::validAddress(), and CoffAnalyser::validAddress().

#define COFF_SCN_MEM_FARDATA   0x00008000
 

Definition at line 169 of file coff_s.h.

#define COFF_SCN_MEM_LOCKED   0x00040000
 

Definition at line 173 of file coff_s.h.

#define COFF_SCN_MEM_NOT_CACHED   0x04000000
 

Definition at line 187 of file coff_s.h.

#define COFF_SCN_MEM_NOT_PAGED   0x08000000
 

Definition at line 188 of file coff_s.h.

#define COFF_SCN_MEM_PRELOAD   0x00080000
 

Definition at line 174 of file coff_s.h.

#define COFF_SCN_MEM_PURGEABLE   0x00020000
 

Definition at line 171 of file coff_s.h.

#define COFF_SCN_MEM_READ   0x40000000
 

Definition at line 191 of file coff_s.h.

Referenced by PEAnalyser::validAddress(), and CoffAnalyser::validAddress().

#define COFF_SCN_MEM_SHARED   0x10000000
 

Definition at line 189 of file coff_s.h.

#define COFF_SCN_MEM_WRITE   0x80000000
 

Definition at line 192 of file coff_s.h.

Referenced by PEAnalyser::validAddress(), and CoffAnalyser::validAddress().

#define COFF_SCN_TYPE_NO_PAD   0x00000008
 

Definition at line 154 of file coff_s.h.

#define COFF_SIZEOF_SECTION_HEADER   40
 

Definition at line 144 of file coff_s.h.

#define COFF_SIZEOF_SHORT_NAME   8
 

Definition at line 129 of file coff_s.h.

Referenced by pe_section_name_to_section().

#define COFF_SYSTEM   0x1000
 

Definition at line 49 of file coff_s.h.

#define COFF_UP_SYSTEM_ONLY   0x4000
 

Definition at line 51 of file coff_s.h.


Typedef Documentation

typedef unsigned int RVA
 

Definition at line 27 of file coff_s.h.

Referenced by XBEAnalyser::addressToFileofs(), PEAnalyser::addressToFileofs(), CoffAnalyser::addressToFileofs(), coff_ofs_is_valid(), coff_ofs_to_rva(), coff_ofs_to_rva_and_section(), coff_rva_is_physical(), coff_rva_is_valid(), coff_rva_to_ofs(), coff_rva_to_section(), XBEAnalyser::convertAddressToRVA(), PEAnalyser::convertAddressToRVA(), CoffAnalyser::convertAddressToRVA(), XBEAnalyser::fileofsToAddress(), PEAnalyser::fileofsToAddress(), CoffAnalyser::fileofsToAddress(), XBEAnalyser::getSegmentNameByAddress(), PEAnalyser::getSegmentNameByAddress(), CoffAnalyser::getSegmentNameByAddress(), ht_pe_export_function::ht_pe_export_function(), ht_pe_import_function::ht_pe_import_function(), ht_xbe_import_function::ht_xbe_import_function(), pe_ofs_is_valid(), pe_ofs_to_rva(), pe_ofs_to_rva_and_section(), pe_rva_is_physical(), pe_rva_is_valid(), pe_rva_to_ofs(), pe_rva_to_section(), XBEAnalyser::validAddress(), PEAnalyser::validAddress(), CoffAnalyser::validAddress(), xbe_ofs_is_valid(), xbe_ofs_to_rva(), xbe_ofs_to_rva_and_section(), xbe_rva_is_physical(), xbe_rva_is_valid(), xbe_rva_to_ofs(), and xbe_rva_to_section().


Variable Documentation

byte COFF_HEADER_struct[]
 

Definition at line 194 of file coff_s.h.

Referenced by ht_coff::init(), and ht_pe::init().

byte COFF_OPTIONAL_HEADER32_struct[]
 

Definition at line 195 of file coff_s.h.

Referenced by ht_coff::init(), and ht_pe::init().

byte COFF_OPTIONAL_HEADER64_struct[]
 

Definition at line 196 of file coff_s.h.

Referenced by ht_pe::init().

byte COFF_SECTION_HEADER_struct[]
 

Definition at line 197 of file coff_s.h.

Referenced by ht_coff::init(), and ht_pe::init().


Generated on Fri May 7 21:15:47 2004 by doxygen 1.3.5