Commit Graph

75 Commits

Author SHA1 Message Date
auronandace 94b2f29beb tackle various clippy lints 2026-06-05 14:36:06 +01:00
Speedy_Lex eff610eac6 Fix many clippy lints 2026-05-07 00:05:07 +02:00
bjorn3 79b469f29d Remove support for _init and _fini in statically linked executables
These are legacy predecessors of .init_array/.fini_array. They were
already not supported by the dynamic linker.
2026-04-28 17:59:45 +02:00
Wildan M e41052d307 Minor ld_so init improvement 2026-03-29 07:48:37 +07:00
auronandace 1421463dac assorted cleanups and add some lints 2026-03-02 10:01:05 +00:00
auronandace 6933287a94 enforce borrow-as-ptr clippy lint 2026-03-01 19:54:31 +00:00
Anhad Singh 4b6789dec5 feat(copy_string_array): make strings contiguous
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-02-27 15:45:04 +11:00
auronandace 5cd6b99588 tackle a few lint instances 2026-02-17 13:00:52 +00:00
Wildan M 83a1680beb Append program name in log 2026-02-13 20:23:29 +07:00
auronandace bb6931cd87 readd ExpectTlsFree 2026-02-08 22:03:34 +00:00
auronandace 9b39861779 add mismatched_lifetime_syntaxes lint 2026-02-08 21:45:15 +00:00
Wildan M 9711dcca51 Implement logger and todo macros 2026-01-25 04:55:18 +07:00
Jeremy Soller 4a50c8f313 Merge branch 'p12' into 'master'
fix(libc): use `ld.so`'s allocator

See merge request redox-os/relibc!882
2026-01-20 20:35:12 -07:00
sourceturner defd2ce7c3 Deny deny-unsafe_op_in_unsafe_fn on the crate level 2026-01-21 00:41:57 +01:00
Anhad Singh bbc86d8027 fix(libc): use ld.so's allocator
Previously, this was implemented incorrectly because `tcb.mspace` was
set just *before* jumping to the program's entry point. However,
`alloc_init` is called when the init functions are run for `libc.so`, so
`tcb.mspace` must be initialized *before* the init functions are
run.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-20 14:00:29 +11:00
Anhad Singh 81e6d4116a fix(redox/build): missing unsafe blocks
This change was made, commited, pushed and tested entirely on Redox :^)
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-01-19 08:42:41 +00:00
sourceturner df5d7b2adb Use unsafe blocks in start.rs 2026-01-18 21:57:21 +01:00
Jeremy Soller 0844e6fc90 WIP: use upper fd table 2025-11-15 07:55:37 -07:00
Jeremy Soller ced734c162 Add RawCell::unsafe_set 2025-10-04 07:50:16 -06:00
Jeremy Soller 82084440ad Support nightly-2025-10-03 2025-10-03 21:51:10 -06:00
Jeremy Soller a1db57a5a3 Get main function in crt0 to fix dynamic linking issues 2025-05-03 11:20:20 -06:00
4lDO2 e6c06a7cf7 Fix signals for spawned threads, and async signal waiting. 2025-04-19 19:27:03 +02:00
4lDO2 ad5efd0f11 Reach init fork 2025-04-19 19:26:57 +02:00
Anhad Singh de9e8a6177 feat(ld.so): config
Currently supported options are `LD_DEBUG` and `LD_LIBRARY_PATH`.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-17 01:07:17 +11:00
Peter Limkilde Svendsen 06fec0b843 Add various basic docstrings 2024-10-27 23:25:57 +01:00
Andrey Turkin a4122753e6 Initial RISC-V64 support 2024-10-11 06:44:54 +03:00
4lDO2 a1e1a159ae Initialize altstack properly. 2024-07-09 15:00:54 +02:00
4lDO2 58d1153536 Split part of TCB into generic-rt 2024-07-09 15:00:53 +02:00
4lDO2 edfe46c60b Write x86-64 signal trampoline asm stub. 2024-07-09 15:00:52 +02:00
4lDO2 53ed7aae59 Move rlct_clone, sigprocmask, sigaction, to rt. 2024-07-09 15:00:52 +02:00
4lDO2 4eb20628f3 Move some of signal config to redox-rt. 2024-07-09 15:00:52 +02:00
Jacob Lorentzon e0b640d530 Implement new low-level signal trampoline 2024-03-17 16:58:42 +00:00
Darley Barreto ce1e31d567 Replace C dlmalloc 2023-12-12 15:04:17 +00:00
4lDO2 75d1c67ca2 Switch to a lightweight CStr wrapper 2023-11-04 18:29:38 +00:00
4lDO2 b9f19f4326 Get pcid to work using this pthread impl. 2023-05-06 17:02:51 +02:00
Jeremy Soller 16abc91341 cargo fmt and cargo fix 2022-11-11 13:27:18 -07:00
Jeremy Soller 367be58666 Set linker_ptr when using static TLS 2022-09-11 11:11:49 -06:00
4lDO2 54b3f873f8 Move cwd from kernel to relibc. 2022-08-13 19:16:45 +02:00
Jeremy Soller dc865148fc Get Linux to compile again 2022-07-27 10:10:41 -06:00
4lDO2 ed196516a2 Only inherit environ from ldso if previously NULL. 2022-07-26 21:34:48 +02:00
4lDO2 4e5ccbffd1 Allow constructors to access env vars. 2022-07-26 21:34:48 +02:00
4lDO2 c95d276af9 Allow POSIX's environ to be set.
Rust's libstd for example uses environ when using the `envs` builder
method for spawning processes, and therefore relibc cannot simply assume
environ will always point to the internal relibc env var Vec.
2022-07-26 21:33:01 +02:00
4lDO2 2186cd1fbd Implement fexec in userspace. 2022-07-26 21:32:56 +02:00
Jeremy Soller 65bd3ed1e3 Fixes for program_invocation_name and program_invocation_short_name 2021-11-30 10:27:24 -07:00
Mateusz Tabaka 58cc9efbc0 Call pthread_init in libc's init_array 2020-09-29 19:20:24 +02:00
Jeremy Soller ae8e070b9e Init TLS before allocator 2020-08-02 14:32:28 -06:00
oddcoder 37a462de5d Apply cargo fmt to the whole repo 2020-07-19 21:27:38 +02:00
oddcoder f4f68a3441 Make use of mspaces 2020-07-18 21:03:46 +02:00
oddcoder 3a8817072c Initialize the mspaces of allocator and keep track of it 2020-07-18 21:03:20 +02:00
oddcoder b717f6cf5a Move IO Initialization to .init_array section
Most shared object in linux have their initialization in a separate
.init_array section. but glibc does not have the same behavour. Instead
the initialization is part of crt0. which (as it seams to me) run after
.init_array section. As such, this patch move IO initialization to
separate function that is marked as .init_array member and then the crt0
call this function only if init_array was never invoked (as in
statically linked binaries).
2020-04-19 14:21:23 +02:00