Ignore:
Timestamp:
Oct 11, 2000, 9:22:29 AM (25 years ago)
Author:
sandervl
Message:

TLS callback fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winimagepeldr.cpp

    r4474 r4481  
    1 /* $Id: winimagepeldr.cpp,v 1.60 2000-10-10 17:14:08 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.61 2000-10-11 07:22:28 sandervl Exp $ */
    22
    33/*
     
    473473                }
    474474                setTLSCallBackAddr((PIMAGE_TLS_CALLBACK *)(sect->realvirtaddr + ((ULONG)tlsDir->AddressOfCallBacks - sect->virtaddr)));
     475                //modify tls callback pointers for new image base address
     476                int i = 0;
     477                while(tlsCallBackAddr[i]) {
     478                        tlsCallBackAddr[i] = (PIMAGE_TLS_CALLBACK)(realBaseAddress + ((ULONG)*tlsCallBackAddr - oh.ImageBase));
     479                        i++;
     480                }
    475481        }
    476482   }
Note: See TracChangeset for help on using the changeset viewer.