mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
readelf: Fall back to default interpreter path on empty path
This fixes readelf failing to map the interpreter for dynamic libraries. When an ELF does not have the PT_INTERP header the StringView will be of the inline capacity of the StringBuilder, not a null StringView. This would cause readelf not to fallback on the default interpreter path.
This commit is contained in:
parent
a9ec0c30eb
commit
6210f62b1d
Notes:
sideshowbarker
2024-07-17 20:43:42 +09:00
Author: https://github.com/TWaalen 🔰
Commit: 6210f62b1d
Pull-request: https://github.com/SerenityOS/serenity/pull/11956
Reviewed-by: https://github.com/bgianfo
1 changed files with 1 additions and 1 deletions
|
@ -311,7 +311,7 @@ int main(int argc, char** argv)
|
|||
RefPtr<ELF::DynamicObject> object = nullptr;
|
||||
|
||||
if (elf_image.is_dynamic()) {
|
||||
if (interpreter_path.is_null()) {
|
||||
if (interpreter_path.is_empty()) {
|
||||
interpreter_path = "/usr/lib/Loader.so"sv;
|
||||
warnln("Warning: Dynamic ELF object has no interpreter path. Using: {}", interpreter_path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue