Lunderberg commented on code in PR #16836:
URL: https://github.com/apache/tvm/pull/16836#discussion_r1549875868


##########
src/runtime/dso_library.cc:
##########
@@ -136,6 +166,50 @@ void DSOLibrary::Load(const std::string& name) {
 
 void* DSOLibrary::GetSymbol_(const char* name) { return dlsym(lib_handle_, 
name); }
 
+void DSOLibrary::ListSymbols_(std::function<void(const char*)> callback) {
+  // Adapted from https://stackoverflow.com/a/62205128
+
+  struct link_map* map = nullptr;
+  dlinfo(lib_handle_, RTLD_DI_LINKMAP, &map);
+
+  Elf64_Sym* symbol_table = nullptr;

Review Comment:
   This particular implementation definitely wouldn't work on Windows, and is 
in the `#ifdef` for the linux-specific code.  Currently, the Windows 
implementation returns an empty list.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to