mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +00:00
LibELF: Always use parent object basename for $ORIGIN processing
Using the main executable basename produces the wrong $ORIGIN processing for libraries that are secondary dependencies of the main executable, or dependencies of an object loaded via dlopen.
This commit is contained in:
parent
64d48bcdc1
commit
72066880c6
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ static Optional<String> resolve_library(String const& name, DynamicObject const&
|
|||
search_paths.append("/usr/local/lib"sv);
|
||||
|
||||
for (auto const& search_path : search_paths) {
|
||||
LexicalPath library_path(search_path.replace("$ORIGIN"sv, LexicalPath::dirname(s_main_program_name)));
|
||||
LexicalPath library_path(search_path.replace("$ORIGIN"sv, LexicalPath::dirname(parent_object.filename())));
|
||||
String library_name = library_path.append(name).string();
|
||||
|
||||
if (access(library_name.characters(), F_OK) == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue