I switched the order of two blocks of code; I have no idea why, and

no longer even remember doing it.
	-Olin
This commit is contained in:
shivers 1999-07-11 20:49:42 +00:00
parent e0b3287da7
commit ebdb86c060
1 changed files with 14 additions and 13 deletions

View File

@ -130,6 +130,20 @@ lookup_dlsym(char *name, long *location)
name++; name++;
#endif #endif
/* find the name in the self process image - ie original scheme48
executable file */
if (!selfhandle)
selfhandle=dlopen((char*)0, S48_DLOPEN_MODE);
if (adr=dlsym(selfhandle, name)) {
*location = (long) adr;
#ifdef DLDEBUG
printf(" %s:%d %s name='%s' in self at adr=%#x\n",
__FILE__, __LINE__, __FUNCTION__,
name, (long) adr);
#endif /*DLDEBUG*/
return 1;
};
/* perhaps i should scan the dlopened_handle from last to first, /* perhaps i should scan the dlopened_handle from last to first,
to find newest incarnation of symbol? in practice it should be faster to find newest incarnation of symbol? in practice it should be faster
to go from first (oldest) to last, to go from first (oldest) to last,
@ -145,19 +159,6 @@ lookup_dlsym(char *name, long *location)
#endif /*DLDEBUG*/ #endif /*DLDEBUG*/
return 1; return 1;
}; };
/* find the name in the self process image - ie original scheme48
executable file */
if (!selfhandle)
selfhandle=dlopen((char*)0, S48_DLOPEN_MODE);
if (adr=dlsym(selfhandle, name)) {
*location = (long) adr;
#ifdef DLDEBUG
printf(" %s:%d %s name='%s' in self at adr=%#x\n",
__FILE__, __LINE__, __FUNCTION__,
name, (long) adr);
#endif /*DLDEBUG*/
return 1;
};
/* can't find name so return 0 */ /* can't find name so return 0 */
#ifdef DLDEBUG #ifdef DLDEBUG
printf(" %s:%d %s name='%s' not found\n", printf(" %s:%d %s name='%s' not found\n",