source: dev/trunk/abdev/BasicCompiler_Common/include/Linker.h@ 263

Last change on this file since 263 was 263, checked in by dai_9181, 17 years ago
File size: 1.4 KB
Line 
1#pragma once
2
3class ObjectModule : public Jenga::Common::BoostSerializationSupport<ObjectModule>
4{
5public:
6 // メタ情報
7 Meta meta;
8
9 // グローバル領域のネイティブコード
10 NativeCode globalNativeCode;
11
12 // データテーブル
13 DataTable dataTable;
14
15 // XMLシリアライズ用
16private:
17 virtual const char *RootTagName() const
18 {
19 return "objectModule";
20 }
21 friend class boost::serialization::access;
22 template<class Archive> void serialize(Archive& ar, const unsigned int version)
23 {
24 trace_for_serialize( "serializing - objectModule" );
25
26 ar & BOOST_SERIALIZATION_NVP( meta );
27 ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
28 ar & BOOST_SERIALIZATION_NVP( dataTable );
29 }
30};
31
32class Linker
33{
34 NativeCode nativeCode;
35 DWORD imageBase;
36
37public:
38
39 Linker()
40 {
41 }
42
43 const NativeCode &GetNativeCode() const
44 {
45 return nativeCode;
46 }
47
48 void SetImageBase( DWORD imageBase )
49 {
50 this->imageBase = imageBase;
51 }
52
53 // データテーブルスケジュール
54 void ResolveDataTableSchedules( long dataSectionBaseOffset );
55
56 // DLL関数スケジュール
57 void ResolveDllProcSchedules( long codeSectionBaseOffset, long importSectionBaseOffset, long lookupSize, long hintSize );
58
59 // ユーザ定義関数スケジュール
60 void ResolveUserProcSchedules( long codeSectionBaseOffset );
61
62 // グローバル変数スケジュール
63 void ResolveGlobalVarSchedules( long rwSectionBaseOffset );
64
65 // リンク
66 void Link( vector<ObjectModule *> &objectModules );
67};
Note: See TracBrowser for help on using the repository browser.