mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
DynamicLinker: Replace $ORIGIN with the executable path
This commit is contained in:
parent
e7f861f34c
commit
35e5024b7d
Notes:
sideshowbarker
2024-07-17 17:42:43 +09:00
Author: https://github.com/timschumi
Commit: 35e5024b7d
Pull-request: https://github.com/SerenityOS/serenity/pull/12631
Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(String c
|
|||
search_paths.append("/usr/local/lib"sv);
|
||||
|
||||
for (auto const& search_path : search_paths) {
|
||||
LexicalPath library_path(search_path);
|
||||
LexicalPath library_path(search_path.replace("$ORIGIN"sv, LexicalPath::dirname(s_main_program_name)));
|
||||
int fd = open(library_path.append(name).string().characters(), O_RDONLY);
|
||||
|
||||
if (fd < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue