Commit Graph

49 Commits

Author SHA1 Message Date
Anhad Singh 023a005688 fix(ld.so): non-pie lazy
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh c286ad2868 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>
2024-12-05 23:11:59 +11:00
Peter Limkilde Svendsen 06fec0b843 Add various basic docstrings 2024-10-27 23:25:57 +01:00
4lDO2 eee603efa8 Remove the "-1 errno" e() function. 2024-09-27 15:35:04 +02:00
4lDO2 8b8b00da01 Use unsigned return values in read()-like Pal fns.
Returning a negative number of bytes makes absolutely no sense, besides
the "-1 and errno" pattern, which is now converted to Result<_, Errno>.
2024-09-27 10:39:26 +02:00
4lDO2 ec216e56e2 Preserve umask across execv. 2024-09-25 20:28:50 +02:00
4lDO2 f6761407e5 Pass si_pid to all realtime signals. 2024-09-24 19:34:51 +02:00
Kamil Koczurek 408a7b2ab6 Add capability to set the default scheme 2024-09-23 14:36:45 +00:00
4lDO2 4bd0d2a1ef Move pthread::Errno to separate module. 2024-09-11 23:22:29 +02:00
4lDO2 53ed7aae59 Move rlct_clone, sigprocmask, sigaction, to rt. 2024-07-09 15:00:52 +02:00
4lDO2 a800693266 Refactor: move redox-exec into redox-rt::proc. 2024-07-09 15:00:52 +02:00
4lDO2 4c11b607de Implement pread and pwrite using the syscalls. 2024-06-14 14:10:47 +02:00
Jacob Lorentzon e0b640d530 Implement new low-level signal trampoline 2024-03-17 16:58:42 +00:00
Peter Limkilde Svendsen a7137512fa Use standard casing and mangling for internal errno 2024-03-01 00:25:42 +00:00
Peter Limkilde Svendsen 9093f6bc47 Use Cell representation for errno 2024-02-29 14:07:40 +00:00
Darley Barreto 298340abf9 Remove ralloc 2024-01-13 10:57:02 -03:00
Darley Barreto ce1e31d567 Replace C dlmalloc 2023-12-12 15:04:17 +00:00
4lDO2 492be53c2c Remove old pthreads-emb OS-specific code. 2023-05-06 17:02:52 +02:00
Jeremy Soller 16abc91341 cargo fmt and cargo fix 2022-11-11 13:27:18 -07:00
4lDO2 5e74d173ab Fix ld.so access function on Redox. 2022-08-13 19:16:48 +02:00
4lDO2 54b3f873f8 Move cwd from kernel to relibc. 2022-08-13 19:16:45 +02:00
4lDO2 049a5156d7 Implement PT_INTERP, and thus dynamic linking.
With this change, gcc can now successfully compile a tiny program that
printfs an integer returned from a function, from a dynamically linked
library that it compiled as well.

Rustc however, is orders of magnitude more complex, and the next step is
to fix constructors which require access to `environ`, in ld.so
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
Jeremy Soller 65bd3ed1e3 Fixes for program_invocation_name and program_invocation_short_name 2021-11-30 10:27:24 -07:00
jD91mZM2 56e1eceb28 Replace AllocStringWriter with CVec 2020-06-29 17:44:57 +02:00
Jeremy Soller 2e27cf525e Work on adding cargo test capability 2020-03-10 20:57:07 -06:00
jD91mZM2 b8c50c7c64 Format 2019-08-04 19:05:45 +02:00
jD91mZM2 c7d499d4f2 Upgrade to the 2018 edition
I didn't think it'd be this useful first, but thank god for `cargo fix --edition`!
2019-08-04 19:05:45 +02:00
jD91mZM2 e559a3e2e5 Stub for ptrace
It's happening...
2019-08-04 19:05:44 +02:00
Mateusz Mikuła ff94798253 Make errno thread local 2019-07-01 16:51:19 +02:00
Jeremy Soller 5715fb7ba6 Work on switching to epoll as backend for select and poll 2019-03-10 13:03:00 -06:00
Jeremy Soller 1a0d363caa Redox support for some minimal ioctl's 2019-01-15 20:50:17 -07:00
Jeremy Soller c71088e768 Cleanup and format 2019-01-14 21:07:24 -07:00
Jeremy Soller 8e9d65cb46 Add support for pthreads to Linux 2019-01-13 14:17:29 -07:00
Jeremy Soller ee40035c4b Add asprintf 2018-12-09 12:45:04 -07:00
Jeremy Soller e8377d259a Mutable argv 2018-12-02 20:14:33 -07:00
Jeremy Soller 52fd4d7e83 Clippy fixes 2018-12-02 08:04:53 -07:00
Jeremy Soller 0ac16556bc Format 2018-11-25 10:34:42 -07:00
Jeremy Soller a5279b648f Fix warnings 2018-11-25 10:34:02 -07:00
jD91mZM2 63882684b2 Implement almost all of printf 2018-10-13 14:20:54 +02:00
jD91mZM2 baddbb98d5 Don't reinvent the wheel in strings.h 2018-10-05 19:33:41 +02:00
jD91mZM2 0451fac66c Delete RawFile in favor of File 2018-09-26 19:40:39 +02:00
jD91mZM2 afc1ff134a Rewrite IO to use core-io library 2018-09-26 16:13:09 +02:00
Jeremy Soller 7f14fcdee0 Remove c_str functions, replace with CStr 2018-09-24 21:08:29 -06:00
Jeremy Soller ef9fee5a2b Prepare for use of Write trait by renaming Write to WriteByte 2018-09-24 20:31:06 -06:00
Paul Sajna 07eb658a8a Netdb 2018-09-01 14:00:18 +00:00
Jeremy Soller bab4e2896a Format 2018-08-27 06:35:30 -06:00
Jeremy Soller 277b9abcd5 Fix build, mostly 2018-08-26 08:56:02 -06:00
Jeremy Soller c20ce5ffed Large reorganization of headers (WIP) 2018-08-26 08:11:35 -06:00