mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
Loader: Don't re-load self-dependant libraries
This commit is contained in:
parent
758fc8c063
commit
d2a984f2c7
Notes:
sideshowbarker
2024-07-19 00:49:54 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/d2a984f2c73 Pull-request: https://github.com/SerenityOS/serenity/pull/3738 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/awesomekling
1 changed files with 3 additions and 2 deletions
|
@ -156,7 +156,9 @@ static Vector<String> get_dependencies(const String& name)
|
|||
auto lib = g_loaders.get(name).value();
|
||||
Vector<String> dependencies;
|
||||
|
||||
lib->for_each_needed_library([&dependencies](auto needed_name) {
|
||||
lib->for_each_needed_library([&dependencies, &name](auto needed_name) {
|
||||
if (name == needed_name)
|
||||
return IterationDecision::Continue;
|
||||
dependencies.append(needed_name);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
|
@ -255,7 +257,6 @@ static FlatPtr loader_main(auxv_t* auxvp)
|
|||
}
|
||||
ASSERT(main_program_fd >= 0);
|
||||
ASSERT(!main_program_name.is_null());
|
||||
dbgln("loading: {}", main_program_name);
|
||||
|
||||
map_library(main_program_name, main_program_fd);
|
||||
map_dependencies(main_program_name);
|
||||
|
|
Loading…
Add table
Reference in a new issue