(dl_open_worker): Avoid dereferencing map in statically linked code if there might none be found.

This commit is contained in:
Ulrich Drepper 2004-10-18 15:37:14 +00:00
parent 36106aabeb
commit 71fa9dfb12

View File

@ -207,7 +207,15 @@ dl_open_worker (void *a)
found_caller:
if (args->nsid == __LM_ID_CALLER)
args->nsid = call_map->l_ns;
{
#ifndef SHARED
/* In statically linked apps there might be no loaded object. */
if (call_map == NULL)
args->nsid = LM_ID_BASE;
else
#endif
args->nsid = call_map->l_ns;
}
}
/* Maybe we have to expand a DST. */