Try loading with safe path using LOAD_LIBRARY_SEARCH_SYSTEM32 first

* autoload.cc (dll_load): Move safe loading from std_dll_init here.
	Add code to handle systems supporting LOAD_LIBRARY_SEARCH flags.
	Add comments to explain what the code is doing.  Fix up comment
	preceeding this function.
	(std_dll_init): Move safe loading code to dll_load.
	* wincap.h (wincaps::has_load_lib_search_flags): New element.
        * wincap.cc: Implement above element throughout.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2016-01-12 15:23:14 +01:00
parent 27086d628e
commit 15d6f564cd
3 changed files with 43 additions and 18 deletions

View File

@@ -45,6 +45,7 @@ struct wincaps
unsigned has_processor_groups : 1;
unsigned has_broken_prefetchvm : 1;
unsigned has_new_pebteb_region : 1;
unsigned has_load_lib_search_flags : 1;
};
class wincapc
@@ -104,6 +105,7 @@ public:
bool IMPLEMENT (has_processor_groups)
bool IMPLEMENT (has_broken_prefetchvm)
bool IMPLEMENT (has_new_pebteb_region)
bool IMPLEMENT (has_load_lib_search_flags)
#undef IMPLEMENT
};