diff --git a/userspace/programs/DynamicLoader/main.cpp b/userspace/programs/DynamicLoader/main.cpp index 3bd6547ff2..537163c53d 100644 --- a/userspace/programs/DynamicLoader/main.cpp +++ b/userspace/programs/DynamicLoader/main.cpp @@ -567,6 +567,9 @@ static void handle_dynamic(LoadedElf& elf) syscall(SYS_CLOSE, library_fd); } + if (pltgot == 0) + return; + // setup required GOT entries reinterpret_cast(pltgot)[0] = reinterpret_cast(elf.dynamics); reinterpret_cast(pltgot)[1] = reinterpret_cast(&elf);