Changeset 257 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Aug 2, 2007, 4:17:27 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/Linker.h
r256 r257 32 32 class Linker 33 33 { 34 // メタ情報 35 vector<const ObjectModule *> objectModules; 34 // データテーブルスケジュール 35 void ResolveDataTableSchedules( long dataSectionBaseOffset ); 36 37 // DLL関数スケジュール 38 void ResolveDllProcSchedules( long codeSectionBaseOffset, long importSectionBaseOffset ); 39 40 // ユーザ定義関数スケジュール 41 void ResolveUserProcSchedules( long codeSectionBaseOffset ); 42 43 // グローバル変数スケジュール 44 void ResolveGlobalVarSchedules( long rwSectionBaseOffset ); 45 46 NativeCode nativeCode; 47 48 DWORD imageBase; 49 50 public: 51 Linker() 52 { 53 } 54 55 void SetImageBase( DWORD imageBase ) 56 { 57 this->imageBase = imageBase; 58 } 59 60 // リンク 61 void Link( vector<ObjectModule *> &objectModules ); 36 62 }; -
trunk/abdev/BasicCompiler_Common/include/NativeCode.h
r256 r257 22 22 UserProc, // ユーザ定義関数呼び出し側スケジュール 23 23 AddressOf, // ユーザ定義関数位置スケジュール 24 DllProc, // DLL関数位置スケジュール 24 25 }; 25 26 … … 62 63 } 63 64 Schedule( const ::DllProc *pDllProc, long offest ) 64 : type( Schedule:: UserProc )65 : type( Schedule::DllProc ) 65 66 , offset( offset ) 66 67 , pDllProc( pDllProc ) … … 69 70 ~Schedule() 70 71 { 72 } 73 74 Type GetType() const 75 { 76 return type; 77 } 78 long GetOffset() const 79 { 80 return offset; 81 } 82 const ::DllProc &GetDllProc() const 83 { 84 if( type != Schedule::DllProc ) 85 { 86 SetError(); 87 } 88 return *pDllProc; 89 } 90 const ::UserProc &GetUserProc() const 91 { 92 if( type != Schedule::UserProc ) 93 { 94 SetError(); 95 } 96 return *pUserProc; 71 97 } 72 98 … … 188 214 return size; 189 215 } 216 const Schedules &GetSchedules() const 217 { 218 return schedules; 219 } 190 220 191 221 long GetLong( int codePos ) const … … 233 263 ObpPlus( size ); 234 264 } 235 void Put( const NativeCode &nativeCode ) 236 { 237 Put( nativeCode.codeBuffer, nativeCode.size ); 238 } 265 void Put( const NativeCode &nativeCode ); 239 266 void Put( _int64 i64data ) 240 267 { -
trunk/abdev/BasicCompiler_Common/include/Procedure.h
r225 r257 314 314 } 315 315 316 const NativeCode &GetNativeCode() const 317 { 318 return nativeCode; 319 } 316 320 NativeCode &GetNativeCode() 317 321 { -
trunk/abdev/BasicCompiler_Common/src/NativeCode.cpp
r250 r257 15 15 { 16 16 int test=0; 17 } 18 } 19 20 void NativeCode::Put( const NativeCode &nativeCode ) 21 { 22 long baseOffset = size; 23 24 Put( nativeCode.codeBuffer, nativeCode.size ); 25 26 BOOST_FOREACH( const Schedule &schedule, nativeCode.schedules ) 27 { 28 this->schedules.push_back( 29 Schedule( 30 schedule.GetType(), 31 baseOffset + schedule.GetOffset() 32 ) 33 ); 17 34 } 18 35 }
Note:
See TracChangeset
for help on using the changeset viewer.