-a -m check for unbound instances (Joanne fix)

This commit is contained in:
Stefan Frederik 2020-12-23 15:57:28 +01:00
parent 5f39beab1d
commit 02f0a416cc
3 changed files with 10 additions and 0 deletions

View File

@ -747,6 +747,9 @@ static const char *test_host =
NL "#include <stdlib.h>"
NL "#include <stdio.h>"
NL "#include %s"
NL "#ifndef RTLD_NOW"
NL "#define RTLD_NOW RTLD_LAZY" /* on old BSD and probably on SunOS */
NL "#endif"
NL "int main() {"
NL " void *handle = NULL;"
NL " void (*func)() = NULL;"

View File

@ -59,6 +59,9 @@ int find_lib_ldl(const char *name, int logdepth, int fatal)
char *test_c =
NL "#include <stdio.h>"
NL "#include <dlfcn.h>"
NL "#ifndef RTLD_NOW"
NL "#define RTLD_NOW RTLD_LAZY" /* on old BSD and probably on SunOS */
NL "#endif"
NL "int main() {"
NL " void *handle;"
NL " handle = dlopen(\"/this file does not exist.\", RTLD_NOW);"

View File

@ -799,6 +799,10 @@ void propagate_hilights(int set)
char *type;
for(i = 0; i < xctx->instances; i++) {
if(xctx->inst[i].ptr < 0 ) {
dbg(0, "propagate_hilights(): .ptr < 0, unbound symbol: instance %d, name=%s\n", i, xctx->inst[i].instname);
continue;
}
if(xctx->inst[i].color) hilights = 1; /* some hilight instances -> don't clear xctx->hilight_nets */
type = (xctx->inst[i].ptr+ xctx->sym)->type;
hilight_connected_inst = (xctx->inst[i].flags & 4) || ((xctx->inst[i].ptr+ xctx->sym)->flags & 4);