Compile the following code and execute with and without LD_PRINT_ERROR set
to a non-empty string. Note that the error is printed twice, apparently
because there's a second attempt to resolve the missing symbol during the
program cleanup.
----
#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);
}
----