p->hashtab = (void *)(p->base + dyn[DT_HASH]);
if (dyn[0]&(1<<DT_RPATH))
p->rpath_orig = (void *)(p->strings + dyn[DT_RPATH]);
+ if (dyn[0]&(1<<DT_RUNPATH))
+ p->rpath_orig = (void *)(p->strings + dyn[DT_RUNPATH]);
if (search_vec(p->dynv, dyn, DT_GNU_HASH))
p->ghashtab = (void *)(p->base + *dyn);
if (search_vec(p->dynv, dyn, DT_VERSYM))
libc.secure = 1;
}
libc.page_size = aux[AT_PAGESZ];
+ libc.auxv = auxv;
/* If the dynamic linker was invoked as a program itself, AT_BASE
* will not be set. In that case, we assume the base address is
}
void *dlopen(const char *file, int mode)
{
+ strcpy(errbuf, "Dynamic loading not supported");
+ errflag = 1;
return 0;
}
void *__dlsym(void *restrict p, const char *restrict s, void *restrict ra)
{
+ errflag = 1;
+ snprintf(errbuf, sizeof errbuf, "Symbol not found: %s", s);
return 0;
}
int __dladdr (const void *addr, Dl_info *info)