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:
parent
e0b3287da7
commit
ebdb86c060
27
dynload.c
27
dynload.c
|
@ -130,6 +130,20 @@ lookup_dlsym(char *name, long *location)
|
|||
name++;
|
||||
#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,
|
||||
to find newest incarnation of symbol? in practice it should be faster
|
||||
to go from first (oldest) to last,
|
||||
|
@ -145,19 +159,6 @@ lookup_dlsym(char *name, long *location)
|
|||
#endif /*DLDEBUG*/
|
||||
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 */
|
||||
#ifdef DLDEBUG
|
||||
printf(" %s:%d %s name='%s' not found\n",
|
||||
|
|
Loading…
Reference in New Issue