1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 14:05:11 +00:00

Kernel: Don't warn when running dynamically-linked ELF without PT_INTERP

We could technically copy the dynamic loader to other path and run it
from there, so let's not assume paths.
If the user is so determined to do such thing, then a warning is quite
meaningless.
This commit is contained in:
Liav A 2023-10-28 11:19:23 +03:00 committed by Andrew Kaster
parent a8601b4ac7
commit 5dba1dedb7

View file

@ -864,8 +864,6 @@ ErrorOr<RefPtr<OpenFileDescription>> Process::find_elf_interpreter_for_executabl
if (main_executable_header.e_type == ET_DYN) { if (main_executable_header.e_type == ET_DYN) {
// If it's ET_DYN with no PT_INTERP, then it's a dynamic executable responsible // If it's ET_DYN with no PT_INTERP, then it's a dynamic executable responsible
// for its own relocation (i.e. it's /usr/lib/Loader.so) // for its own relocation (i.e. it's /usr/lib/Loader.so)
if (path != "/usr/lib/Loader.so")
dbgln("exec({}): WARNING - Dynamic ELF executable without a PT_INTERP header, and isn't /usr/lib/Loader.so", path);
return nullptr; return nullptr;
} }