fix(ld.so): do not depend on TLS at all

In the next big refactor (next PR), all of the platform functionality
used by both relibc and ld.so will be moved into a `platform`/`sysdeps`
crate and then ld.so would be moved out of relibc and not link with it.

I think doing it in a seperate PR would make it more managable, as when
I did half of it, the diff was pretty huge and that way it would be
easier to review too :)

Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
Anhad Singh
2024-12-05 23:03:52 +11:00
parent a527cc53ea
commit c286ad2868
16 changed files with 143 additions and 102 deletions
+1 -1
View File
@@ -852,7 +852,7 @@ pub unsafe extern "C" fn perror(s: *const c_char) {
} else {
"Unknown error"
};
let mut w = platform::FileWriter(2);
let mut w = platform::FileWriter::new(2);
// The prefix, `s`, is optional (empty or NULL) according to the spec
match CStr::from_nullable_ptr(s).and_then(|s_cstr| str::from_utf8(s_cstr.to_bytes()).ok()) {