Compile the following code and execute with
LD_UTRACE=yes ktrace ./a.out ; kdump -t u
Note the inclusion of error messages.
----
#include <dlfcn.h>
#include <err.h>
#include <stdio.h>
int main(int argc, char **argv)
{
if (dlsym(NULL, "symbol_missing") != NULL)
errx(1, "Found unexpected symbol");
return (0);
}
----