* dyn_load.c [!USE_PROC_FOR_LIBRARIES] (GC_FirstDLOpenedLinkMap):
Declare dp local variable only if !NETBSD or !RTLD_DI_LINKMAP.
STATIC struct link_map *
GC_FirstDLOpenedLinkMap(void)
{
- ElfW(Dyn) *dp;
static struct link_map *cachedResult = 0;
if (0 == (ptr_t)_DYNAMIC) {
cachedResult = lm->l_next;
}
# else
+ ElfW(Dyn) *dp;
int tag;
+
for( dp = _DYNAMIC; (tag = dp->d_tag) != 0; dp++ ) {
if( tag == DT_DEBUG ) {
struct link_map *lm