ladybird/Kernel/Syscalls
Gunnar Beutner 22ebd754d3 Kernel: Fix loading ELF images without PT_INTERP
Previously we'd try to load ELF images which did not have
an interpreter set with an incorrect load offset of 0, i.e. way
outside of the part of the address space where we'd expect either
the dynamic loader or the user's executable to reside.

This fixes the problem by using get_load_offset for both executables
which have an interpreter set and those which don't. Notably this
allows us to actually successfully execute the Loader.so binary:

courage:~ $ /usr/lib/Loader.so
You have invoked `Loader.so'. This is the helper program for programs
that use shared libraries. Special directives embedded in executables
tell the kernel to load this program.

This helper program loads the shared libraries needed by the program,
prepares the program to run, and runs it. You do not need to invoke
this helper program directly.
courage:~ $
2021-05-10 20:39:08 +02:00
..
access.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
alarm.cpp Kernel: Modify TimeManagement::current_time(..) API so it can't fail. (#6869) 2021-05-05 18:51:06 +02:00
anon_create.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
beep.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
chdir.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
chmod.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
chown.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
chroot.cpp Kernel: Plumb OOM propagation through Custody factory 2021-05-10 11:55:52 +02:00
clock.cpp Kernel: Modify TimeManagement::current_time(..) API so it can't fail. (#6869) 2021-05-05 18:51:06 +02:00
debug.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
disown.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
dup2.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
emuctl.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
execve.cpp Kernel: Fix loading ELF images without PT_INTERP 2021-05-10 20:39:08 +02:00
exit.cpp Kernel: Add PerformanceManager static class, move perf event APIs there 2021-05-07 15:35:23 +02:00
fcntl.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
fork.cpp Kernel: Move process creation perf events to PerformanceManager 2021-05-07 15:35:23 +02:00
ftruncate.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
futex.cpp Kernel: Check futex command if realtime clock is used 2021-04-27 09:19:55 +02:00
get_dir_entries.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
get_stack_bounds.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
getrandom.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
getuid.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
hostname.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
ioctl.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
keymap.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
kill.cpp Kernel: Don't allow to kill kernel processes 2021-04-23 13:26:02 +02:00
link.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
lseek.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
mkdir.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
mknod.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
mmap.cpp Kernel: Add PerformanceManager static class, move perf event APIs there 2021-05-07 15:35:23 +02:00
module.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
mount.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
open.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
perf_event.cpp Kernel+Profiler: Improve profiling subsystem 2021-04-26 17:13:55 +02:00
pipe.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
pledge.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
prctl.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
process.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
profiling.cpp Kernel: Move process creation perf events to PerformanceManager 2021-05-07 15:35:23 +02:00
ptrace.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
purge.cpp Kernel: Harden sys$purge Vector usage against OOM. 2021-04-29 20:31:15 +02:00
read.cpp Kernel: Harden sys$readv / sys$writev Vector usage against OOM. 2021-04-29 20:31:15 +02:00
readlink.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
realpath.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
rename.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
rmdir.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
sched.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
select.cpp Kernel: Harden sys$select Vector usage against OOM. 2021-04-29 20:31:15 +02:00
sendfd.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
setpgid.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
setuid.cpp Kernel: Harden sys$setgroups Vector usage against OOM 2021-05-01 09:10:30 +02:00
shutdown.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
sigaction.cpp Kernel: Support null act argument for sigaction syscall 2021-04-24 23:00:28 +02:00
socket.cpp Kernel: Accepted socket file descriptors should not inherit flags 2021-04-30 11:43:19 +02:00
stat.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
sync.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
sysconf.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
thread.cpp Kernel: Add PerformanceManager static class, move perf event APIs there 2021-05-07 15:35:23 +02:00
times.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ttyname.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
umask.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
uname.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
unlink.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
unveil.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
utime.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
waitid.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
watch_file.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
write.cpp Kernel: Harden sys$readv / sys$writev Vector usage against OOM. 2021-04-29 20:31:15 +02:00