Changeset 3433 for trunk/src/kernel32/winimagepe2lx.cpp
- Timestamp:
- Apr 20, 2000, 12:16:49 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagepe2lx.cpp
r3430 r3433 1 /* $Id: winimagepe2lx.cpp,v 1. 9 2000-04-19 20:19:13bird Exp $ */1 /* $Id: winimagepe2lx.cpp,v 1.10 2000-04-19 22:16:49 bird Exp $ */ 2 2 3 3 /* … … 274 274 { 275 275 PVOID pv; 276 ULONG ulBorlandRVAFix = 0UL; 277 276 278 pv = getPointerFromRVA(pTLSDir->StartAddressOfRawData); 279 /* 280 * Borland seems to have problems getting things right... 281 * Needs to subtract image base to make the TLSDir "RVA"s real 282 * RVAs before converting them to pointers. 283 */ 284 if ((pv == NULL || pTLSDir->StartAddressOfRawData == 0UL) 285 && pTLSDir->StartAddressOfRawData > this->pNtHdrs->OptionalHeader.ImageBase) 286 { 287 ulBorlandRVAFix = this->pNtHdrs->OptionalHeader.ImageBase; 288 pv = getPointerFromRVA(pTLSDir->StartAddressOfRawData - ulBorlandRVAFix); 289 } 277 290 if (pv == NULL || pTLSDir->StartAddressOfRawData == 0UL) 278 291 { … … 284 297 setTLSInitSize(pTLSDir->EndAddressOfRawData - pTLSDir->StartAddressOfRawData); 285 298 setTLSTotalSize(pTLSDir->EndAddressOfRawData - pTLSDir->StartAddressOfRawData + pTLSDir->SizeOfZeroFill); 286 pv = getPointerFromRVA((ULONG)pTLSDir->AddressOfIndex );299 pv = getPointerFromRVA((ULONG)pTLSDir->AddressOfIndex - ulBorlandRVAFix); 287 300 if (pv == NULL) 288 301 { … … 292 305 } 293 306 setTLSIndexAddr((LPDWORD)pv); 294 pv = getPointerFromRVA((ULONG)pTLSDir->AddressOfCallBacks );307 pv = getPointerFromRVA((ULONG)pTLSDir->AddressOfCallBacks - ulBorlandRVAFix); 295 308 if (pv == NULL) 296 309 {
Note:
See TracChangeset
for help on using the changeset viewer.