mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +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
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