mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:47:44 +00:00
LibELF: Improve error messages for missing shared libraries
This commit is contained in:
parent
dce57cd085
commit
f2ff8f2658
1 changed files with 4 additions and 1 deletions
|
@ -101,7 +101,10 @@ static void map_library(const String& name)
|
||||||
// TODO: Do we want to also look for libs in other paths too?
|
// TODO: Do we want to also look for libs in other paths too?
|
||||||
String path = String::formatted("/usr/lib/{}", name);
|
String path = String::formatted("/usr/lib/{}", name);
|
||||||
int fd = open(path.characters(), O_RDONLY);
|
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);
|
map_library(name, fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue