misc(ld.so): cleanup

Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
Anhad Singh
2026-07-15 22:06:59 +10:00
parent 6697881222
commit bf2455ea2e
4 changed files with 12 additions and 15 deletions
+2 -4
View File
@@ -90,8 +90,6 @@ static mut __relibc_init_environ: *mut *mut c_char = ptr::null_mut();
extern "C" fn init_array() {
// The thing is that we cannot guarantee if
// init_array runs first or if relibc_start runs first
// Still whoever gets to run first must initialize rust
// memory allocator before doing anything else.
unsafe {
if INIT_COMPLETE {
@@ -99,14 +97,14 @@ extern "C" fn init_array() {
}
}
io_init();
unsafe {
if platform::environ.is_null() {
platform::environ = __relibc_init_environ;
}
}
io_init();
unsafe {
crate::pthread::init();
INIT_COMPLETE = true