1 /* test to build and run so that we know if we have dladdr
4 /* bloody FSF dlcfn.h won't give us dladdr without this */
13 /* dladdr(3) is broken on NetBSD currently, don't forget to replace
14 with a version check when they fix it */
17 void * handle
= dlopen((void*)0, RTLD_GLOBAL
| RTLD_NOW
);
18 void * addr
= dlsym(handle
, "printf");
19 Dl_info
* info
= (Dl_info
*) malloc(sizeof(Dl_info
));
20 if (dladdr(addr
, info
) == 0) {