aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/sysdeps/dripos
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:52 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 18:24:51 -0500
commitf5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 (patch)
tree93b156621dc0303816b37f60ba88051b702d92f6 /lib/mlibc/sysdeps/dripos
parentbd5969fc876a10b18613302db7087ef3c40f18e1 (diff)
build: Build mlibc + add distclean target
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/sysdeps/dripos')
-rw-r--r--lib/mlibc/sysdeps/dripos/crt-x86_64/crt1.S9
-rw-r--r--lib/mlibc/sysdeps/dripos/generic/entry.cpp35
-rw-r--r--lib/mlibc/sysdeps/dripos/generic/generic.cpp298
-rw-r--r--lib/mlibc/sysdeps/dripos/generic/thread.cpp53
-rw-r--r--lib/mlibc/sysdeps/dripos/generic/thread_entry.S11
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/access.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/auxv.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/blkcnt_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/blksize_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/clockid_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/dev_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/epoll.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/errno.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/fcntl.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/fsblkcnt_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/fsfilcnt_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/gid_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/in.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/ino_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/inotify.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/ioctls.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/limits.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/mode_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/mqueue.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/msg.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/nlink_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/packet.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/pid_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/poll.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/ptrace.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/resource.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/seek-whence.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/shm.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/signal.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/socket.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/socklen_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/stat.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/statfs.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/statvfs.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/suseconds_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/termios.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/time.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/uid_t.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/utsname.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/vm-flags.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/wait.h1
l---------lib/mlibc/sysdeps/dripos/include/abi-bits/xattr.h1
-rw-r--r--lib/mlibc/sysdeps/dripos/include/mlibc/thread-entry.hpp10
-rw-r--r--lib/mlibc/sysdeps/dripos/meson.build71
49 files changed, 0 insertions, 529 deletions
diff --git a/lib/mlibc/sysdeps/dripos/crt-x86_64/crt1.S b/lib/mlibc/sysdeps/dripos/crt-x86_64/crt1.S
deleted file mode 100644
index 18d109e..0000000
--- a/lib/mlibc/sysdeps/dripos/crt-x86_64/crt1.S
+++ /dev/null
@@ -1,9 +0,0 @@
-
-.section .text
-.global _start
-_start:
- mov $main, %rdi
- call __mlibc_entry
-
-.section .note.GNU-stack,"",%progbits
-
diff --git a/lib/mlibc/sysdeps/dripos/generic/entry.cpp b/lib/mlibc/sysdeps/dripos/generic/entry.cpp
deleted file mode 100644
index 2b8b914..0000000
--- a/lib/mlibc/sysdeps/dripos/generic/entry.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <bits/ensure.h>
-#include <mlibc/elf/startup.h>
-
-// defined by the POSIX library
-void __mlibc_initLocale();
-
-extern "C" uintptr_t *__dlapi_entrystack();
-
-extern char **environ;
-static mlibc::exec_stack_data __mlibc_stack_data;
-
-struct LibraryGuard {
- LibraryGuard();
-};
-
-static LibraryGuard guard;
-
-LibraryGuard::LibraryGuard() {
- __mlibc_initLocale();
-
- // Parse the exec() stack.
- mlibc::parse_exec_stack(__dlapi_entrystack(), &__mlibc_stack_data);
- mlibc::set_startup_data(__mlibc_stack_data.argc, __mlibc_stack_data.argv,
- __mlibc_stack_data.envp);
-}
-
-extern "C" void __mlibc_entry(int (*main_fn)(int argc, char *argv[], char *env[])) {
- // TODO: call __dlapi_enter, otherwise static builds will break (see Linux sysdeps)
- auto result = main_fn(__mlibc_stack_data.argc, __mlibc_stack_data.argv, environ);
- exit(result);
-}
-
diff --git a/lib/mlibc/sysdeps/dripos/generic/generic.cpp b/lib/mlibc/sysdeps/dripos/generic/generic.cpp
deleted file mode 100644
index 89203c3..0000000
--- a/lib/mlibc/sysdeps/dripos/generic/generic.cpp
+++ /dev/null
@@ -1,298 +0,0 @@
-#include <bits/ensure.h>
-#include <mlibc/debug.hpp>
-#include <mlibc/all-sysdeps.hpp>
-#include <mlibc/thread-entry.hpp>
-#include <errno.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <limits.h>
-
-namespace mlibc {
-
-void sys_libc_log(const char *message) {
- unsigned long res;
- asm volatile ("syscall" : "=a"(res)
- : "a"(50), "D"(message)
- : "rcx", "r11", "rdx");
-}
-
-void sys_libc_panic() {
- mlibc::infoLogger() << "\e[31mmlibc: panic!" << frg::endlog;
- asm volatile ("syscall" :
- : "a"(12), "D"(1)
- : "rcx", "r11", "rdx");
-}
-
-int sys_tcb_set(void *pointer) {
- int res;
- asm volatile ("syscall" : "=a"(res)
- : "a"(300), "D"(pointer)
- : "rcx", "r11", "rdx");
- return res;
-}
-
-int sys_anon_allocate(size_t size, void **pointer) {
- void *ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(9), "D"(0), "S"(size)
- : "rcx", "r11");
-
- if (!ret)
- return sys_errno;
-
- *pointer = ret;
- return 0;
-}
-
-int sys_anon_free(void *pointer, size_t size) {
- int unused_return;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(unused_return), "=d"(sys_errno)
- : "a"(11), "D"(pointer), "S"(size)
- : "rcx", "r11");
-
- if (unused_return)
- return sys_errno;
-
- return 0;
-}
-
-#ifndef MLIBC_BUILDING_RTDL
-void sys_exit(int status) {
- asm volatile ("syscall" :
- : "a"(12), "D"(status)
- : "rcx", "r11", "rdx");
-}
-#endif
-
-#ifndef MLIBC_BUILDING_RTDL
-int sys_clock_get(int clock, time_t *secs, long *nanos) {
- return 0;
-}
-#endif
-
-int sys_open(const char *path, int flags, mode_t mode, int *fd) {
- int ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(2), "D"(path), "S"(flags), "d"(0)
- : "rcx", "r11");
-
- if (ret == -1)
- return sys_errno;
-
- *fd = ret;
- return 0;
-}
-
-int sys_close(int fd) {
- int ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(3), "D"(fd)
- : "rcx", "r11");
-
- if (ret == -1)
- return sys_errno;
-
- return 0;
-}
-
-int sys_read(int fd, void *buf, size_t count, ssize_t *bytes_read) {
- ssize_t ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(0), "D"(fd), "S"(buf), "d"(count)
- : "rcx", "r11");
-
- if (ret == -1)
- return sys_errno;
-
- *bytes_read = ret;
- return 0;
-}
-
-#ifndef MLIBC_BUILDING_RTDL
-int sys_write(int fd, const void *buf, size_t count, ssize_t *bytes_written) {
- ssize_t ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(1), "D"(fd), "S"(buf), "d"(count)
- : "rcx", "r11");
-
- if (ret == -1)
- return sys_errno;
-
- *bytes_written = ret;
- return 0;
-}
-#endif
-
-
-int sys_seek(int fd, off_t offset, int whence, off_t *new_offset) {
- off_t ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(8), "D"(fd), "S"(offset), "d"(whence)
- : "rcx", "r11");
-
- if (ret == -1)
- return sys_errno;
-
- *new_offset = ret;
- return 0;
-}
-
-int sys_vm_map(void *hint, size_t size, int prot, int flags,
- int fd, off_t offset, void **window) {
- __ensure(flags & MAP_ANONYMOUS);
- void *ret;
- int sys_errno;
-
- // mlibc::infoLogger() << "calling sys_vm_map with size: " << size << frg::endlog;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(9), "D"(hint), "S"(size)
- : "rcx", "r11");
-
- if (!ret)
- return sys_errno;
-
- *window = ret;
-
- return 0;
-}
-
-int sys_vm_unmap(void *pointer, size_t size) {
- return sys_anon_free(pointer, size);
-}
-
-int sys_futex_wait(int *pointer, int expected, const struct timespec *time) {
- uint64_t err;
- asm volatile ("syscall"
- : "=d"(err)
- : "a"(66), "D"(pointer), "S"(expected)
- : "rcx", "r11");
-
- if (err) {
- return -1;
- }
-
- return 0;
-}
-
-int sys_futex_wake(int *pointer) {
- uint64_t err;
- asm volatile ("syscall"
- : "=d"(err)
- : "a"(65), "D"(pointer)
- : "rcx", "r11");
-
- if (err) {
- return -1;
- }
-
- return 0;
-}
-
-// All remaining functions are disabled in ldso.
-#ifndef MLIBC_BUILDING_RTDL
-
-int sys_clone(void *tcb, pid_t *tid_out, void *stack) {
- int tid;
-
- asm volatile ("syscall"
- : "=a"(tid)
- : "a"(67), "D"(__mlibc_start_thread), "S"(stack), "d"(tcb)
- : "rcx", "r11");
-
- if (tid_out)
- *tid_out = tid;
-
- return 0;
-}
-
-void sys_thread_exit() {
- asm volatile ("syscall"
- :
- : "a"(68)
- : "rcx", "r11");
- __builtin_trap();
-}
-
-int sys_sleep(time_t *secs, long *nanos) {
- long ms = (*nanos / 1000000) + (*secs * 1000);
- asm volatile ("syscall"
- :
- : "a"(6), "D"(ms)
- : "rcx", "r11");
- *secs = 0;
- *nanos = 0;
- return 0;
-}
-
-int sys_fork(pid_t *child) {
- pid_t ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(57)
- : "rcx", "r11");
-
- if (ret == -1)
- return sys_errno;
-
- *child = ret;
- return 0;
-}
-
-int sys_execve(const char *path, char *const argv[], char *const envp[]) {
- int ret;
- int sys_errno;
-
- asm volatile ("syscall"
- : "=a"(ret), "=d"(sys_errno)
- : "a"(59), "D"(path), "S"(argv), "d"(envp)
- : "rcx", "r11");
-
- if (sys_errno != 0)
- return sys_errno;
-
- return 0;
-}
-
-pid_t sys_getpid() {
- pid_t pid;
- asm volatile ("syscall" : "=a"(pid)
- : "a"(5)
- : "rcx", "r11", "rdx");
- return pid;
-}
-pid_t sys_getppid() {
- pid_t ppid;
- asm volatile ("syscall" : "=a"(ppid)
- : "a"(14)
- : "rcx", "r11", "rdx");
- return ppid;
-}
-
-#endif // MLIBC_BUILDING_RTDL
-
-} // namespace mlibc
diff --git a/lib/mlibc/sysdeps/dripos/generic/thread.cpp b/lib/mlibc/sysdeps/dripos/generic/thread.cpp
deleted file mode 100644
index 42cd758..0000000
--- a/lib/mlibc/sysdeps/dripos/generic/thread.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <mlibc/thread-entry.hpp>
-#include <mlibc/all-sysdeps.hpp>
-#include <mlibc/tcb.hpp>
-#include <bits/ensure.h>
-#include <sys/mman.h>
-#include <stdint.h>
-#include <stddef.h>
-
-extern "C" void __mlibc_enter_thread(void *entry, void *user_arg, Tcb *tcb) {
- // Wait until our parent sets up the TID.
- while(!__atomic_load_n(&tcb->tid, __ATOMIC_RELAXED))
- mlibc::sys_futex_wait(&tcb->tid, 0, nullptr);
-
- if(mlibc::sys_tcb_set(tcb))
- __ensure(!"sys_tcb_set() failed");
-
- tcb->invokeThreadFunc(entry, user_arg);
-
- auto self = reinterpret_cast<Tcb *>(tcb);
-
- __atomic_store_n(&self->didExit, 1, __ATOMIC_RELEASE);
- mlibc::sys_futex_wake(&self->didExit);
-
- mlibc::sys_thread_exit();
-}
-
-namespace mlibc {
-
-static constexpr size_t default_stacksize = 0x200000;
-
-int sys_prepare_stack(void **stack, void *entry, void *user_arg, void *tcb, size_t *stack_size, size_t *guard_size, void **stack_base) {
- if (!*stack_size)
- *stack_size = default_stacksize;
- *guard_size = 0;
-
- if (*stack) {
- *stack_base = *stack;
- } else {
- *stack_base = mmap(nullptr, *stack_size,
- PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- }
-
- uintptr_t *sp = reinterpret_cast<uintptr_t *>(reinterpret_cast<uintptr_t>(*stack_base) + *stack_size);
-
- *--sp = reinterpret_cast<uintptr_t>(tcb);
- *--sp = reinterpret_cast<uintptr_t>(user_arg);
- *--sp = reinterpret_cast<uintptr_t>(entry);
- *stack = reinterpret_cast<void*>(sp);
- return 0;
-}
-
-} //namespace mlibc
diff --git a/lib/mlibc/sysdeps/dripos/generic/thread_entry.S b/lib/mlibc/sysdeps/dripos/generic/thread_entry.S
deleted file mode 100644
index 51e703b..0000000
--- a/lib/mlibc/sysdeps/dripos/generic/thread_entry.S
+++ /dev/null
@@ -1,11 +0,0 @@
-
-.section .text
-.global __mlibc_start_thread
-__mlibc_start_thread:
- pop %rdi
- pop %rsi
- pop %rdx
- call __mlibc_enter_thread
-
-.section .note.GNU-stack,"",%progbits
-
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/access.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/access.h
deleted file mode 120000
index 171f75f..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/access.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/access.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/auxv.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/auxv.h
deleted file mode 120000
index 866c8bb..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/auxv.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/dripos/auxv.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/blkcnt_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/blkcnt_t.h
deleted file mode 120000
index e9d9f1b..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/blkcnt_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/blkcnt_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/blksize_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/blksize_t.h
deleted file mode 120000
index c6dfb6e..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/blksize_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/blksize_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/clockid_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/clockid_t.h
deleted file mode 120000
index 71f37bb..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/clockid_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/clockid_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/dev_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/dev_t.h
deleted file mode 120000
index 0c1143b..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/dev_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/dev_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/epoll.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/epoll.h
deleted file mode 120000
index 9efc3a0..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/epoll.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/epoll.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/errno.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/errno.h
deleted file mode 120000
index 2a2ab26..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/errno.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/dripos/errno.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/fcntl.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/fcntl.h
deleted file mode 120000
index ea5323a..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/fcntl.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/fcntl.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/fsblkcnt_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/fsblkcnt_t.h
deleted file mode 120000
index 898dfb2..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/fsblkcnt_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/fsblkcnt_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/fsfilcnt_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/fsfilcnt_t.h
deleted file mode 120000
index 791755c..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/fsfilcnt_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/fsfilcnt_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/gid_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/gid_t.h
deleted file mode 120000
index 6a77218..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/gid_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/gid_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/in.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/in.h
deleted file mode 120000
index b58c683..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/in.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/in.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/ino_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/ino_t.h
deleted file mode 120000
index 10d644e..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/ino_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/ino_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/inotify.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/inotify.h
deleted file mode 120000
index 3f19ef6..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/inotify.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/inotify.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/ioctls.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/ioctls.h
deleted file mode 120000
index 595106b..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/ioctls.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/ioctls.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/limits.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/limits.h
deleted file mode 120000
index 1aa5894..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/limits.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/limits.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/mode_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/mode_t.h
deleted file mode 120000
index 29d7733..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/mode_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/mode_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/mqueue.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/mqueue.h
deleted file mode 120000
index fa87b07..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/mqueue.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/mqueue.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/msg.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/msg.h
deleted file mode 120000
index f402b49..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/msg.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/msg.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/nlink_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/nlink_t.h
deleted file mode 120000
index 7618c27..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/nlink_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/nlink_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/packet.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/packet.h
deleted file mode 120000
index 47067e2..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/packet.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/packet.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/pid_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/pid_t.h
deleted file mode 120000
index 3fd26a7..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/pid_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/pid_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/poll.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/poll.h
deleted file mode 120000
index ab989c7..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/poll.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/poll.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/ptrace.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/ptrace.h
deleted file mode 120000
index f391fb7..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/ptrace.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/ptrace.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/resource.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/resource.h
deleted file mode 120000
index 3e59c75..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/resource.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/resource.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/seek-whence.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/seek-whence.h
deleted file mode 120000
index 3bd41ef..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/seek-whence.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/seek-whence.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/shm.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/shm.h
deleted file mode 120000
index 067d8c4..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/shm.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/shm.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/signal.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/signal.h
deleted file mode 120000
index b20e511..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/signal.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/signal.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/socket.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/socket.h
deleted file mode 120000
index 0e1d6be..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/socket.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/socket.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/socklen_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/socklen_t.h
deleted file mode 120000
index 41f3b11..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/socklen_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/socklen_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/stat.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/stat.h
deleted file mode 120000
index 82642c3..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/stat.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/stat.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/statfs.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/statfs.h
deleted file mode 120000
index e3d202f..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/statfs.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/statfs.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/statvfs.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/statvfs.h
deleted file mode 120000
index 1fc80c2..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/statvfs.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/statvfs.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/suseconds_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/suseconds_t.h
deleted file mode 120000
index 9ed6597..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/suseconds_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/suseconds_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/termios.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/termios.h
deleted file mode 120000
index cfcfe76..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/termios.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/termios.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/time.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/time.h
deleted file mode 120000
index 2a02625..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/time.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/time.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/uid_t.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/uid_t.h
deleted file mode 120000
index 1113eba..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/uid_t.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/uid_t.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/utsname.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/utsname.h
deleted file mode 120000
index 17b993f..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/utsname.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/utsname.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/vm-flags.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/vm-flags.h
deleted file mode 120000
index f1a985e..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/vm-flags.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/vm-flags.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/wait.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/wait.h
deleted file mode 120000
index 6d911c7..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/wait.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/mlibc/wait.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/abi-bits/xattr.h b/lib/mlibc/sysdeps/dripos/include/abi-bits/xattr.h
deleted file mode 120000
index 66412d7..0000000
--- a/lib/mlibc/sysdeps/dripos/include/abi-bits/xattr.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../../abis/linux/xattr.h \ No newline at end of file
diff --git a/lib/mlibc/sysdeps/dripos/include/mlibc/thread-entry.hpp b/lib/mlibc/sysdeps/dripos/include/mlibc/thread-entry.hpp
deleted file mode 100644
index 2dd88a6..0000000
--- a/lib/mlibc/sysdeps/dripos/include/mlibc/thread-entry.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include <mlibc/tcb.hpp>
-
-extern "C" void __mlibc_start_thread(void);
-extern "C" void __mlibc_enter_thread(void *entry, void *user_arg, Tcb *tcb);
-
-namespace mlibc {
- void *prepare_stack(void *entry, void *user_arg, void *tcb);
-}
diff --git a/lib/mlibc/sysdeps/dripos/meson.build b/lib/mlibc/sysdeps/dripos/meson.build
deleted file mode 100644
index afecf25..0000000
--- a/lib/mlibc/sysdeps/dripos/meson.build
+++ /dev/null
@@ -1,71 +0,0 @@
-
-rtdl_sources += files(
- 'generic/generic.cpp'
-)
-
-libc_sources += files(
- 'generic/entry.cpp',
- 'generic/generic.cpp',
- 'generic/thread.cpp',
- 'generic/thread_entry.S'
-)
-
-if not no_headers
- install_headers(
- 'include/abi-bits/auxv.h',
- 'include/abi-bits/seek-whence.h',
- 'include/abi-bits/vm-flags.h',
- 'include/abi-bits/errno.h',
- 'include/abi-bits/fcntl.h',
- 'include/abi-bits/in.h',
- 'include/abi-bits/resource.h',
- 'include/abi-bits/stat.h',
- 'include/abi-bits/signal.h',
- 'include/abi-bits/socket.h',
- 'include/abi-bits/termios.h',
- 'include/abi-bits/blkcnt_t.h',
- 'include/abi-bits/blksize_t.h',
- 'include/abi-bits/dev_t.h',
- 'include/abi-bits/gid_t.h',
- 'include/abi-bits/ino_t.h',
- 'include/abi-bits/mode_t.h',
- 'include/abi-bits/nlink_t.h',
- 'include/abi-bits/pid_t.h',
- 'include/abi-bits/uid_t.h',
- 'include/abi-bits/access.h',
- 'include/abi-bits/wait.h',
- 'include/abi-bits/limits.h',
- 'include/abi-bits/utsname.h',
- 'include/abi-bits/ptrace.h',
- 'include/abi-bits/poll.h',
- 'include/abi-bits/epoll.h',
- 'include/abi-bits/packet.h',
- 'include/abi-bits/inotify.h',
- 'include/abi-bits/clockid_t.h',
- 'include/abi-bits/shm.h',
- 'include/abi-bits/mqueue.h',
- 'include/abi-bits/suseconds_t.h',
- 'include/abi-bits/fsfilcnt_t.h',
- 'include/abi-bits/fsblkcnt_t.h',
- 'include/abi-bits/socklen_t.h',
- 'include/abi-bits/statfs.h',
- 'include/abi-bits/statvfs.h',
- 'include/abi-bits/ioctls.h',
- 'include/abi-bits/xattr.h',
- 'include/abi-bits/msg.h',
- subdir: 'abi-bits',
- follow_symlinks: true
- )
-endif
-
-if not headers_only
- crt = custom_target('crt1',
- build_by_default: true,
- command: c_compiler.cmd_array() + ['-c', '-o', '@OUTPUT@', '@INPUT@'],
- input: 'crt-x86_64/crt1.S',
- output: 'crt1.o',
- install: true,
- install_dir: get_option('libdir')
- )
-endif
-