From 13241731dc0ba5677ddc1f16e1defc4f2b1d4aab Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 9 Oct 2021 17:12:11 +0200 Subject: [PATCH] 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. --- src/system/runtime_loader/elf_load_image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/runtime_loader/elf_load_image.cpp b/src/system/runtime_loader/elf_load_image.cpp index 9a72d6b0b0..44526bebf1 100644 --- a/src/system/runtime_loader/elf_load_image.cpp +++ b/src/system/runtime_loader/elf_load_image.cpp @@ -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; }