Commit Graph

13 Commits

Author SHA1 Message Date
Bananymous ac90800c3c Kernel/LibC/DynamicLoader: Implement thread local storage
For some reason this does not work on 32 bit version, so it is disabled
on that platform. I'll have to look into it later to find the bug :)
2025-04-15 23:33:39 +03:00
Bananymous 254fd80088 DynamicLoader: Cleanup and prepare for TLS 2025-04-15 23:31:17 +03:00
Bananymous 36baf7b0af Kernel/LibC/DynamicLoader: Update process start ABI
We now use SysV abi for process startup
2025-04-15 23:05:52 +03:00
Bananymous e6026cb0b8 DynamicLoader: Handle circular dependencies 2025-04-15 23:05:52 +03:00
Bananymous 4f49d60e4a DynamicLoader/LibC: lazy malloc environ
This allows DynamicLoader to just set the value of global environ symbol
without libc needing to malloc it at startup
2025-04-15 23:05:52 +03:00
Bananymous c6cd185cb5 DynamicLoader: Fix copy relocations
Weak symbols are now actually resolved to the same strong symbol between
shared objects and copy relocations now work!
2025-01-24 19:23:33 +02:00
Bananymous 3a465cb94f DynamicLoader: Don't write to pltgot if it does not exist
This makes `tcc` compile runnable executables
2024-12-04 21:11:43 +02:00
Bananymous 415b20f884 LibC: Remove errno EEXISTS
I don't know why I had added this. It doesn't seem to be a thing on
either POSIX or linux. This was literally equivalent to EXIST
2024-12-02 20:13:38 +02:00
Bananymous 708a720d9d Kernel: Remove SYS_OPEN
This can be done with SYS_OPENAT with fd set to AT_FDCWD
2024-09-17 16:16:47 +03:00
Bananymous 4006a04817 DynamicLoader: Don't do file backed mapping over file bounds 2024-09-11 19:30:35 +03:00
Bananymous 19d16620a6 DynamicLoader: Don't do file backed mapping for filesz == 0 2024-09-05 14:50:05 +03:00
Bananymous e8bcebfb8e DynamicLoader: Use file backed mmap when possible 2024-09-05 13:59:39 +03:00
Bananymous aa7e92b275 Userspace: Write a dynamic loader
This allows running executing dynamically linked executables!
2024-09-05 12:58:21 +03:00