| 1 | #define _GNU_SOURCE |
| 2 | #include <dlfcn.h> |
| 3 | #include "dynlink.h" |
| 4 | |
| 5 | int dlinfo(void *dso, int req, void *res) |
| 6 | { |
| 7 | 	if (__dl_invalid_handle(dso)) return -1; |
| 8 | 	if (req != RTLD_DI_LINKMAP) { |
| 9 | 		__dl_seterr("Unsupported request %d", req); |
| 10 | 		return -1; |
| 11 | 	} |
| 12 | 	*(struct link_map **)res = dso; |
| 13 | 	return 0; |
| 14 | } |