Fixes hang due to change in order of initialization of libraries
Fixes hang due to change in order of initialization of libraries that have cyclical dependencies and they call hsa_init() during their initialization phase. This implementation looks for a symbol called "HSA_AMD_TOOL_PRIORITY" across all loaded shared libraries using dynamic section entries of the loaded lib instead of using dlopen and dlsym for the same purpose. Change-Id: I4865f2fd18dd186ec311a432ec38fbb5583805d2
This commit is contained in:
@@ -1542,7 +1542,7 @@ void Runtime::LoadTools() {
|
||||
}
|
||||
|
||||
// Discover loaded tools.
|
||||
std::vector<os::LibHandle> loaded = os::GetLoadedLibs();
|
||||
std::vector<os::LibHandle> loaded = os::GetLoadedToolsLib();
|
||||
for(auto& handle : loaded) {
|
||||
const uint32_t* order = (const uint32_t*)os::GetExportAddress(handle, "HSA_AMD_TOOL_PRIORITY");
|
||||
if(order) {
|
||||
|
||||
Reference in New Issue
Block a user