runtime_loader: improve error message

When a library is not found, it is useful to know why it was linked in
by showing the previous link in the dependency chain. We had the
information available, but did not use it in the error message.
This commit is contained in:
Adrien Destugues 2021-10-09 17:12:11 +02:00
parent fb5c24d812
commit 13241731dc

View File

@ -526,7 +526,7 @@ load_image(char const* name, image_type type, const char* rpath,
fd = open_executable(path, type, rpath, get_program_path(),
requestingObjectPath, sSearchPathSubDir);
if (fd < 0) {
FATAL("Cannot open file %s: %s\n", name, strerror(fd));
FATAL("Cannot open file %s(needed by %s): %s\n", name, requestingObjectPath, strerror(fd));
KTRACE("rld: load_container(\"%s\"): failed to open file", name);
return fd;
}