diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-04-14 04:28:33 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-14 13:13:06 +0200 |
commit | f2ff8f2658e0c740a12d1ef1674a4a64bcd7a461 (patch) | |
tree | 20e8cfe60ce7c965b7aa8c78868642ce5a62cde9 | |
parent | dce57cd085fa4a135e50b85e26636c4cd587ab11 (diff) | |
download | serenity-f2ff8f2658e0c740a12d1ef1674a4a64bcd7a461.zip |
LibELF: Improve error messages for missing shared libraries
-rw-r--r-- | Userland/Libraries/LibELF/DynamicLinker.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibELF/DynamicLinker.cpp b/Userland/Libraries/LibELF/DynamicLinker.cpp index 439229e246..6dd78b2500 100644 --- a/Userland/Libraries/LibELF/DynamicLinker.cpp +++ b/Userland/Libraries/LibELF/DynamicLinker.cpp @@ -101,7 +101,10 @@ static void map_library(const String& name) // TODO: Do we want to also look for libs in other paths too? String path = String::formatted("/usr/lib/{}", name); int fd = open(path.characters(), O_RDONLY); - VERIFY(fd >= 0); + if (fd < 0) { + fprintf(stderr, "Could not find required shared library: %s\n", path.characters()); + VERIFY_NOT_REACHED(); + } map_library(name, fd); } |