Bananymous
86dcb5c471
init: Don't leak pwent fd to child processes
2024-09-11 22:11:05 +03:00
Bananymous
467ac6c365
Kernel/LibC: Implement SOCK_CLOEXEC and SOCK_NONBLOCK
...
This removes the need for fcntl after creating a socket :)
2024-09-11 21:59:11 +03:00
Bananymous
c77ad5fb34
Kernel: Implement copy-on-write memory for file backed `mmap`s
2024-09-11 19:33:50 +03:00
Bananymous
4006a04817
DynamicLoader: Don't do file backed mapping over file bounds
2024-09-11 19:30:35 +03:00
Bananymous
4189a1c729
LibC: Make _init and _fini weak symbols
...
These seem to be missing sometimes when making shared executables
2024-09-11 14:39:07 +03:00
Bananymous
a07cbabcb3
LibC: Define function sizes for setjmp and longjmp
...
dynamic linking was complaining about these not existing
2024-09-10 16:21:20 +03:00
Bananymous
64a3893f6f
Kernel: Add command line option to disable AML parsing
...
This can be handy if my broken AML parser crashes or hangs while parsing
AML :D
2024-09-10 16:20:24 +03:00
Bananymous
eabe759ebf
Kernel: Don't require APs that are not started to start :D
2024-09-10 16:19:43 +03:00
Bananymous
a4838386e6
Kernel: Remove unnecessary branch from uncanonicalizing addresses
2024-09-10 16:19:16 +03:00
Bananymous
c65613901f
Kernel: Fix AML aliases and package elements
2024-09-10 16:18:42 +03:00
Bananymous
19d16620a6
DynamicLoader: Don't do file backed mapping for filesz == 0
2024-09-05 14:50:05 +03:00
Bananymous
4e15b9cdfa
Ports: Add explicit -libgcc-shared for ports on 32 bit
2024-09-05 14:49:23 +03:00
Bananymous
de35cec2e1
Kernel: Allow private file mappings past file end
...
This is just to make memory mapping ELF files easier :D
2024-09-05 14:48:42 +03:00
Bananymous
e8bcebfb8e
DynamicLoader: Use file backed mmap when possible
2024-09-05 13:59:39 +03:00
Bananymous
2f241e1b61
Kernel: Implement FileBackedRegion::clone
2024-09-05 13:59:09 +03:00
Bananymous
6affef76b1
test-shared: Add more shared tests
2024-09-05 12:59:48 +03:00
Bananymous
32ba4d07e2
Userspace: Remove unnecessary mov instruction from crt0
2024-09-05 12:59:05 +03:00
Bananymous
ddaaf89c87
BuildSystem: Make default libc a shared library
2024-09-05 12:58:35 +03:00
Bananymous
9aed8dbe6b
Toolchain: Build crtbeginS.o crtendS.o and shared libgcc
2024-09-05 12:58:21 +03:00
Bananymous
aa7e92b275
Userspace: Write a dynamic loader
...
This allows running executing dynamically linked executables!
2024-09-05 12:58:21 +03:00
Bananymous
f30947336a
BuildSystem: Cleanup cmake files
2024-09-05 12:52:25 +03:00
Bananymous
0bb44d7b75
LibC: Fix errno to work with shared libraries
2024-09-04 21:16:04 +03:00
Bananymous
1138ec77ca
Kernel: Fix MemoryBackedRegion cloning for non page aligned size
2024-09-04 21:14:26 +03:00
Bananymous
c4dadd27ac
BAN: Fix refenrece -> reference typo
2024-09-03 16:39:21 +03:00
Bananymous
04c715d314
BuildSystem: Build all libraries in root build directory
...
I could not figure out how to use cmake's rpath to build libraries with
DT_NEEDED only containing the library name, not a relative path.
2024-09-02 21:31:08 +03:00
Bananymous
35743cc8e6
LibC: Compile both static and shared version of LibC
...
libc target is now set as an alias for libc-static
2024-09-02 21:28:02 +03:00
Bananymous
5f92807fdd
userspace: Allow building without SSE
...
I had added changes that had broken compilation without sse support
2024-09-02 21:25:00 +03:00
Bananymous
700c3444f5
LibELF: Add more values and macros for interpreting fields
2024-09-02 20:40:38 +03:00
Bananymous
ddf1babfe1
Kernel: Cleanup constructor calls
2024-08-31 02:23:08 +03:00
Bananymous
2ae2ede0b2
LibELF: Add value definitions for DT_
2024-08-30 15:35:01 +03:00
Bananymous
ef5af384e7
Kernel: Print userspace invalid pointer access address
2024-08-30 15:34:37 +03:00
Bananymous
a134d16070
Kernel: Fix MemoryRegion test for contains_fully
2024-08-30 15:33:58 +03:00
Bananymous
827eec6af0
Kernel: Make .rodata read-only and add -orphan-handling=error
...
I don't really know why .rodata was marked writable :D
2024-08-30 15:33:02 +03:00
Bananymous
8da2f12ba6
Kernel: Only load program headers of interpreter if its present
...
I was loading program headers of both executable and interpreter but
that is incorrect. The interpreter will itself load the program headers
of the executable.
2024-08-28 21:19:37 +03:00
Bananymous
50ab391133
test-globals: print something when calling main
...
This shows that constructors and destructors are called in correct order
2024-08-28 17:09:07 +03:00
Bananymous
991647bc8f
Userspace: Add shared library test
...
I will use this while testing my dynamic loader
2024-08-28 17:08:37 +03:00
Bananymous
57300687ff
LibC: Cleanup and fix missing LibC headers
2024-08-28 17:07:58 +03:00
Bananymous
d559339f5f
LibC: Compile shared libc as well as static
2024-08-28 17:07:15 +03:00
Bananymous
2bf65ef512
Kernel: Invoke ELF interpreter instead if it is specified
2024-08-28 17:06:32 +03:00
Bananymous
d20752c318
Kernel: Make OpenFileDescritorSet::open take rvalue
...
This gets rid of some implicit allocations from copy constructors
2024-08-28 16:36:10 +03:00
Bananymous
5f66ef34dd
Kernel: map userspace arguments after the entry point
...
This allows cleaner memory layout for processes that are not loaded to
default location
2024-08-27 22:46:08 +03:00
Bananymous
da0b4cd40e
Kernel: Allow MAP_FIXED in mmap
2024-08-27 22:45:49 +03:00
Bananymous
68f9dc1f8a
Toolchain: Add support for building shared libraries
2024-08-27 17:36:09 +03:00
Bananymous
5121d0d934
Kernel: Allow loading PIEs
...
This is initial work towards implementing dynamic loader and shared
library support.
2024-08-27 17:32:22 +03:00
Bananymous
2c520391eb
Kernel/LibC: Add support for init_array and fini_array
2024-08-27 00:47:03 +03:00
Bananymous
7c4b9218f2
Kernel: VirtualTTY now resets ansi state before printing anything
2024-08-25 17:56:06 +03:00
Bananymous
72f8138ca1
Kernel: Disable scheduler load balancing until I get it fixed
...
Scheduler keeps crashing all the time when running on multiple cores.
This patch disabled the load balancer, which seems to get rid of most
scheduler crashes.
2024-08-25 15:37:17 +03:00
Bananymous
991ae4383a
Kernel/LibC: Implement fchmod
2024-08-25 15:07:42 +03:00
Bananymous
2ce7205c80
Kernel: Add command line option to disable debug printing
...
The whole system can crash when debug output and tty output are done at
the same time. This patch is just a hack to prevent the crash :D
2024-08-25 15:02:15 +03:00
Bananymous
bec3e8654f
Shell: Implement escaping quotes in quoted strings
2024-08-24 17:13:50 +03:00