char *interp = NULL;
char *interp_dir = NULL;
int byteswap;
+static int interpreter_already_found=0;
inline uint32_t byteswap32_to_host(uint32_t value)
{
}
/* We add libc.so.0 elsewhere */
- if ((tmp=strrchr(interp, '/')) != NULL)
+ if (interpreter_already_found && (tmp=strrchr(interp, '/')) != NULL)
{
int len = strlen(interp_dir);
if (strcmp(s, interp+1+len)==0)
}
}
-static int interpreter_already_found=0;
static struct library * find_elf_interpreter(Elf32_Ehdr* ehdr)
{
Elf32_Phdr *phdr;
if (interpreter_already_found==1)
return NULL;
- interpreter_already_found=1;
phdr = elf_find_phdr_type(PT_INTERP, ehdr);
if (phdr) {
struct library *cur, *newlib=NULL;
cur->next = newlib;
}
#endif
+ interpreter_already_found=1;
return newlib;
}
return NULL;