diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-12-19 16:50:35 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-12-19 16:50:35 +0400 |
commit | f08bc8585833ed7d21208d9dbd0b49482470d0ee (patch) | |
tree | d011a999c5f64f4032491d8fbb740c9b634d4883 /winsup/cygwin/dcrt0.cc | |
parent | 93a61a6fe3fbdabe7c4223931309be5954702500 (diff) |
* dcrt0.cc (dll_crt0_0): Check for wincap.wow64_has_secondary_stack
rather than for wincap.is_wow64. Accommodate name change from
wow64_has_64bit_parent to wow64_needs_stack_adjustment. Align comment.
(_dll_crt0): Ditto.
* wincap.h (wincaps::wow64_has_secondary_stack): New element.
* wincap.cc: Implement above element throughout.
(wincapc::init): Set wow64_has_secondary_stack to false on non-64 bit
systems.
* wow64.cc (wow64_needs_stack_adjustment): Rename (hopefully the last
time) from wow64_has_64bit_parent.
(wow64_eval_expected_main_stack): Fix comment to reflect real life.
(wow64_test_for_64bit_parent): Fix comment.
* wow64.h (wow64_needs_stack_adjustment): Accommodate new name.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index f74c25c09..8d5017715 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -705,11 +705,12 @@ dll_crt0_0 () if (!child_proc_info) { memory_init (true); - /* WOW64 process? Check if we have been started from 64 bit process - and if our stack is at an unusual address. Set wow64_has_64bit_parent - if so. Problem description in wow64_test_for_64bit_parent. */ - if (wincap.is_wow64 ()) - wow64_has_64bit_parent = wow64_test_for_64bit_parent (); + /* WOW64 process on XP/64 or Server 2003/64? Check if we have been + started from 64 bit process and if our stack is at an unusual + address. Set wow64_needs_stack_adjustment if so. Problem + description in wow64_test_for_64bit_parent. */ + if (wincap.wow64_has_secondary_stack ()) + wow64_needs_stack_adjustment = wow64_test_for_64bit_parent (); } else { @@ -945,9 +946,10 @@ __cygwin_exit_return: \n\ extern "C" void __stdcall _dll_crt0 () { - /* Handle WOW64 process started from native 64 bit process. See comment - in wow64_test_for_64bit_parent for a full problem description. */ - if (wow64_has_64bit_parent && !dynamically_loaded) + /* Handle WOW64 process on XP/2K3 which has been started from native 64 bit + process. See comment in wow64_test_for_64bit_parent for a full problem + description. */ + if (wow64_needs_stack_adjustment && !dynamically_loaded) { /* Must be static since it's referenced after the stack pointers have been moved. */ |