* dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
* init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker. Call wincap.init here before doing anything else. Use wincap.is_wow64 to determine if we're running in a WOW64 emulator. * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's apparently not supported. (mmap64): Don't create mappings beyond EOF, which would need to use AT_ROUND_TO_PAGE, on WOW64. * wincap.cc (wincap): Throw into the .cygwin_dll_common section. (wincapc::init): Determine if running in WOW64 and set wow_64 flag. * wincap.h (class wincapc): Add wow64 member. (wincapc::is_wow64): New method.
This commit is contained in:
@@ -713,7 +713,7 @@ static NO_COPY wincaps wincap_vista = {
|
||||
has_working_virtual_lock:true
|
||||
};
|
||||
|
||||
wincapc wincap;
|
||||
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
|
||||
|
||||
void
|
||||
wincapc::init ()
|
||||
@@ -820,6 +820,10 @@ wincapc::init ()
|
||||
((wincaps *)this->caps)->is_server = true;
|
||||
}
|
||||
|
||||
BOOL is_wow64_proc = FALSE;
|
||||
if (IsWow64Process (GetCurrentProcess (), &is_wow64_proc))
|
||||
wow64 = is_wow64_proc;
|
||||
|
||||
__small_sprintf (osnam, "%s-%d.%d", os, version.dwMajorVersion,
|
||||
version.dwMinorVersion);
|
||||
}
|
||||
|
Reference in New Issue
Block a user