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

Last change on this file since 258 was 258, checked in by dai_9181, 17 years ago

Linkerの骨格を作成した

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 void SetImageBase( DWORD imageBase )
44 {
45 this->imageBase = imageBase;
46 }
47
48 // データテーブルスケジュール
49 void ResolveDataTableSchedules( long dataSectionBaseOffset );
50
51 // DLL関数スケジュール
52 void ResolveDllProcSchedules( long codeSectionBaseOffset, long importSectionBaseOffset, long lookupSize, long hintSize );
53
54 // ユーザ定義関数スケジュール
55 void ResolveUserProcSchedules( long codeSectionBaseOffset );
56
57 // グローバル変数スケジュール
58 void ResolveGlobalVarSchedules( long rwSectionBaseOffset );
59
60 // リンク
61 void Link( vector<ObjectModule *> &objectModules );
62};
Note: See TracBrowser for help on using the repository browser.