| 22 | namespace { |
| 23 | #ifdef MLX_HAS_DL_ITERATE_PHDR |
| 24 | int dl_iterate_callback(struct dl_phdr_info* info, size_t size, void* data) { |
| 25 | auto libNames = reinterpret_cast<std::vector<std::string>*>(data); |
| 26 | libNames->push_back(info->dlpi_name); |
| 27 | return 0; |
| 28 | } |
| 29 | std::vector<std::string> find_loaded_lib_names() { |
| 30 | std::vector<std::string> libNames; |
| 31 | dl_iterate_phdr(dl_iterate_callback, &libNames); |
nothing calls this directly
no outgoing calls
no test coverage detected