Fix the Loader

Instead of dlopen'ing RTLD_NOLOAD a library (for example libamdhip64.so)
and rely on the dynamic linker search path, search through the already
loaded shared objects for a library with a matching name.

Change-Id: I3e74d432bd7ca68df8927ca435b290e86aaaf9e9
This commit is contained in:
Laurent Morichetti
2022-09-08 00:31:03 -07:00
parent ab3f361f61
commit db69cc1c9f
5 changed files with 138 additions and 208 deletions
+2 -2
View File
@@ -63,8 +63,8 @@ int fullCallback(void* data, uintptr_t pc, const char* filename, int lineno, con
BackTraceInfo* info = static_cast<BackTraceInfo*>(data);
info->sstream << std::endl
<< " #" << std::dec << info->depth++ << ' ' << std::showbase << std::hex
<< std::setfill('0') << std::setw(sizeof(pc) * 2) << pc;
<< " #" << std::dec << info->depth++ << ' ' << "0x" << std::noshowbase
<< std::hex << std::setfill('0') << std::setw(sizeof(pc) * 2) << pc;
if (function == nullptr)
backtrace_syminfo(info->state, pc, syminfoCallback, errorCallback, data);
else {