summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
53de960)
before, only the first library that failed to load or symbol that
failed to resolve was reported, and then the dynamic linker
immediately exited. when attempting to fix a library compatibility
issue, this is about the worst possible behavior. now we print all
errors as they occur and exit at the very end if errors were
encountered.
static int ssp_used;
static int runtime;
static int ldd_mode;
static int ssp_used;
static int runtime;
static int ldd_mode;
static jmp_buf rtld_fail;
static pthread_rwlock_t lock;
static struct debug debug;
static jmp_buf rtld_fail;
static pthread_rwlock_t lock;
static struct debug debug;
dso->name, name);
if (runtime) longjmp(rtld_fail, 1);
dprintf(2, "%s\n", errbuf);
dso->name, name);
if (runtime) longjmp(rtld_fail, 1);
dprintf(2, "%s\n", errbuf);
+ ldso_fail = 1;
+ continue;
}
sym_size = sym->st_size;
} else {
}
sym_size = sym->st_size;
} else {
p->strings + p->dynv[i+1], p->name);
if (runtime) longjmp(rtld_fail, 1);
dprintf(2, "%s\n", errbuf);
p->strings + p->dynv[i+1], p->name);
if (runtime) longjmp(rtld_fail, 1);
dprintf(2, "%s\n", errbuf);
+ ldso_fail = 1;
+ continue;
}
if (runtime) {
tmp = realloc(*deps, sizeof(*tmp)*(ndeps+2));
}
if (runtime) {
tmp = realloc(*deps, sizeof(*tmp)*(ndeps+2));
reloc_all(app->next);
reloc_all(app);
reloc_all(app->next);
reloc_all(app);
+ if (ldso_fail) _exit(127);
if (ldd_mode) _exit(0);
/* Switch to runtime mode: any further failures in the dynamic
if (ldd_mode) _exit(0);
/* Switch to runtime mode: any further failures in the dynamic