mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 19:45:39 +00:00
Small hack to check if we need to relocate the TLS directory or not
(some seem to need this pointer relocateable, some already do relocate it by themselves).
This commit is contained in:
parent
9607512134
commit
a19862fc47
|
@ -1056,7 +1056,12 @@ void PE_InitTls( void )
|
|||
|
||||
if ( pem->tlsindex == -1 ) {
|
||||
pem->tlsindex = TlsAlloc();
|
||||
*pdir->AddressOfIndex=pem->tlsindex;
|
||||
if ((((DWORD)pdir->AddressOfIndex)>peh->OptionalHeader.ImageBase)
|
||||
&&(((DWORD)pdir->AddressOfIndex)<peh->OptionalHeader.ImageBase+peh->OptionalHeader.SizeOfImage)
|
||||
)
|
||||
*pdir->AddressOfIndex=pem->tlsindex;
|
||||
else
|
||||
*(LPDWORD)((((char*)pdir->AddressOfIndex)+delta))=pem->tlsindex;
|
||||
}
|
||||
datasize= pdir->EndAddressOfRawData-pdir->StartAddressOfRawData;
|
||||
size = datasize + pdir->SizeOfZeroFill;
|
||||
|
|
Loading…
Reference in a new issue