Changeset 355 in dev for trunk/abdev/BasicCompiler_Common/src/Linker.cpp
- Timestamp:
- Nov 2, 2007, 2:53:56 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/Linker.cpp
r342 r355 17 17 } 18 18 } 19 20 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules ) 21 { 22 if( schedule.GetType() == Schedule::DataTable ) 23 { 24 #ifdef _WIN64 25 dataTable.OverwriteInt64( 26 schedule.GetOffset(), 27 dataTable.GetInt64( schedule.GetOffset() ) + imageBase + dataSectionBaseOffset 28 ); 29 #else 30 dataTable.Overwrite( 31 schedule.GetOffset(), 32 dataTable.GetLong( schedule.GetOffset() ) + imageBase + dataSectionBaseOffset 33 ); 34 #endif 35 } 36 } 19 37 } 20 38 … … 116 134 } 117 135 } 136 137 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules ) 138 { 139 if( schedule.GetType() == Schedule::Vtbl ) 140 { 141 LONG_PTR vtblMasterListOffset = schedule.GetClass().GetVtblMasterListOffset(); 142 143 #ifdef _WIN64 144 dataTable.OverwriteInt64( 145 schedule.GetOffset(), 146 vtblMasterListOffset + imageBase + dataSectionBaseOffset 147 ); 148 #else 149 dataTable.Overwrite( 150 schedule.GetOffset(), 151 vtblMasterListOffset + imageBase + dataSectionBaseOffset 152 ); 153 #endif 154 } 155 } 156 } 157 158 void Linker::ResolveTypeInfoSchedule( long dataSectionBaseOffset ) 159 { 160 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules ) 161 { 162 if( schedule.GetType() == Schedule::TypeInfo ) 163 { 164 LONG_PTR typeInfoDataTableOffset = schedule.GetClass().GetTypeInfoDataTableOffset(); 165 166 #ifdef _WIN64 167 dataTable.OverwriteInt64( 168 schedule.GetOffset(), 169 typeInfoDataTableOffset + imageBase + dataSectionBaseOffset 170 ); 171 #else 172 dataTable.Overwrite( 173 schedule.GetOffset(), 174 typeInfoDataTableOffset + imageBase + dataSectionBaseOffset 175 ); 176 #endif 177 } 178 } 118 179 } 119 180 … … 143 204 } 144 205 } 206 207 void Linker::SetDataTable( DataTable &dataTable ) 208 { 209 this->dataTable.Add( dataTable ); 210 }
Note:
See TracChangeset
for help on using the changeset viewer.