[Wine] map_dll in libs/wine/loader.c ,what do it do?

yaocong wineforum-user at winehq.org
Fri Mar 11 02:05:13 CST 2011

Hi,I am planting wine to a new Operating System.
I found that in libs/wine/loader.c ->map_dll ,a piece of code like:


    /* module address must be aligned on 64K boundary */
    addr = (BYTE *)((nt_descr->OptionalHeader.ImageBase + 0xffff) & ~0xffff);
    if (wine_anon_mmap( addr, page_size, PROT_READ|PROT_WRITE, MAP_FIXED ) != addr) return NULL;

My questing is the so (such as ntdll.dll.so,kernel32.dll.so) is already loaded ,and can be accessed ,why wine_anon_mmap is needed here?

Thank you.

More information about the wine-users mailing list