Commit Graph

2544 Commits

Author SHA1 Message Date
Jeremy Soller ac9505c246 Merge branch 'fix-199-improved-hashbang' into 'master'
Handle prepended whitespace for hashbang

See merge request redox-os/relibc!591
2024-12-30 17:14:24 +00:00
Josh Megnauth 513f1951fe Handle prepended whitespace for hashbang 2024-12-30 17:14:24 +00:00
Jeremy Soller 647141a3fc Merge branch 'popen-test-fix' into 'master'
fix popen tests

See merge request redox-os/relibc!593
2024-12-29 00:58:44 +00:00
Ron Williams a4ca5b4e85 fix popen tests 2024-12-28 16:34:27 -08:00
Jeremy Soller 1196bea3e4 Merge branch 'imp_str' into 'master'
Add missing functions to `string.h`

See merge request redox-os/relibc!592
2024-12-28 22:46:45 +00:00
Darley Barreto ae5a5256b4 Add missing functions to string.h 2024-12-28 22:46:45 +00:00
Jeremy Soller 841abb180a Merge branch 'dup2-tests' into 'master'
fix popen, improve tests

See merge request redox-os/relibc!590
2024-12-27 14:02:55 +00:00
Ron Williams 9df3708a1a fix popen, improve tests 2024-12-26 17:14:15 -08:00
Jeremy Soller 8deec75e45 Merge branch 'patch5' into 'master'
feat(ld.so): lazy binding and scopes

See merge request redox-os/relibc!586
2024-12-25 13:18:31 +00:00
Anhad Singh 1ffd7187ef feat(dlfcn): define RTLD_DEFAULT
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-25 19:27:31 +11:00
Anhad Singh 2be4316aec feat(dlfcn): return DSO as the handle
Fine because:
> The value of this handle should not be interpreted in any way by the
> caller.
From: https://pubs.opengroup.org/onlinepubs/009696599/functions/dlopen.html

* Add tests for unload
* Implement NOLOAD so we can test that the loaded object has been
  destroyed.
* Minor cleanup.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-25 16:17:51 +11:00
Anhad Singh 1612c78774 fix(ld.so): disable lazy binding on non-x86_64
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
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 1db68ab978 feat(ld.so): scopes
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh 13d819ac89 misc(ld.so: __plt_resolve_inner): println -> trace
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh e3587017f6 fix(ld.so): stub plt stub for non-x86_64
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh 0a0ecb018f fix(ld.so: adjust_stack): remove dead code
Does not do anything.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh c6fd0517ac feat(ld.so: config): handle LD_BIND_NOW
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh 5ae1b8e974 feat(ld.so): lazy binding
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh 30970e111a feat(ld.so): enable warnings just for ld.so
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh 959982b8a4 fix(ld.so): use Strtab::get_at()
> use of deprecated method `goblin::strtab::Strtab::<'a>::get`: Bad performance, use get_at() instead

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh cc5e0ceebc fix(ld.so): function signature
No longer expects a self TLS.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh eb82f9afeb misc(lint): unused variables and imports
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Anhad Singh 500848bc76 fix(ld.so): remove unreachable loop {}
_exit() is noreturn

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-24 20:51:53 +11:00
Jeremy Soller 427e177bec Merge branch 'memcpy-slices' into 'master'
Reimplement memcpy() using slices, fix unaligned read/write, add test

See merge request redox-os/relibc!587
2024-12-23 19:14:45 +00:00
Peter Limkilde Svendsen 93b6374d1e Reimplement memcpy() using slices, fix unaligned read/write, add test 2024-12-23 19:14:44 +00:00
Jeremy Soller a4ba9cf0ad Merge branch 'relibc' into 'master'
Implement 'tar.h'

See merge request redox-os/relibc!588
2024-12-20 14:27:31 +00:00
gugz0r ff66c10a27 Code cleanup. 2024-12-19 13:58:05 +01:00
Ribbon 41c88ed288 Document the build instructions and improve the README 2024-12-19 02:41:40 +00:00
gugz0r e96eb6dac6 Fix formatting issues detected by rustfmt. 2024-12-18 23:11:02 +01:00
gugz0r 6fc19f8fdf Add tests and improve comments. 2024-12-18 22:59:36 +01:00
gugz0r a4cd089189 Implement 'tar.h' 2024-12-18 22:11:33 +01:00
Jeremy Soller bc79bc4ac2 Merge branch 'unsafe_blocks-glob-inttypes-libgen' into 'master'
Unsafe blocks: `glob`, `inttypes`, `libgen`

See merge request redox-os/relibc!584
2024-12-18 14:04:12 +00:00
Jeremy Soller 69578c46cb Merge branch 'cpio' into 'master'
Implement `cpio.h`

See merge request redox-os/relibc!585
2024-12-18 14:03:52 +00:00
Jeremy Soller 392168e524 Merge branch 'patch3' into 'master'
fix(Makefile): delay

See merge request redox-os/relibc!582
2024-12-18 14:03:18 +00:00
bitstr0m ce7e553ae9 Implement cpio.h 2024-12-17 10:38:43 +00:00
Josh Megnauth af7f5c4a3f Unsafe blocks: glob, inttypes, libgen
Related to #194.
2024-12-17 02:15:49 -05:00
Anhad Singh 632716ada7 fix(Makefile): delay
I noticed a pretty significant delay (of ~5s on my machine) after
executing `make`.

This was because TARGET was currently defined as a recursively expanded
variable. This means that the command:

rustc -Z unstable-options --print target-spec-json | grep llvm-target | cut -d '"' -f4

..will get run everytime TARGET is mentioned. This patch fixes the above
by defining the variable as an immediately expanded value. This will
ensure the command only get run once and still skips if predefined.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-17 15:57:17 +11:00
Jeremy Soller 14ecc9540a Merge branch 'patch4' into 'master'
fix(ci): formatting

See merge request redox-os/relibc!583
2024-12-16 19:57:53 +00:00
Anhad Singh 39c8cc864d fix(ci): formatting
Was my fault.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-17 03:14:33 +11:00
Jeremy Soller a54dc95f43 Merge branch 'devel2' into 'master'
feat(ld.so): config via env vars

See merge request redox-os/relibc!581
2024-12-16 15:38:40 +00: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
Jeremy Soller 6fdcd4f44a Merge branch 'unsafe_blocks-getopt-grp' into 'master'
Unsafe blocks: `getopt.h`, `grp.h`

See merge request redox-os/relibc!580
2024-12-15 14:34:38 +00:00
Jeremy Soller 444bb5b485 Merge branch 'glob' into 'master'
Implement `glob.h`

See merge request redox-os/relibc!579
2024-12-15 14:32:11 +00:00
Jeremy Soller 0da7e3befb Merge branch 'unsafe_blocks-fcntl-fnmatch' into 'master'
Unsafe blocks: `fcntl.h`, `fnmatch.h`

See merge request redox-os/relibc!578
2024-12-13 14:38:48 +00:00
Jeremy Soller 15de4e67c5 Merge branch 'redox_dynlink' into 'master'
fix(ld.so): redox

See merge request redox-os/relibc!577
2024-12-13 14:13:11 +00:00
Josh Megnauth 14988e33b2 Unsafe blocks: getopt.h, grp.h 2024-12-13 01:20:24 -05:00
bitstr0m 5d6ae507e1 Implement glob.h 2024-12-12 15:17:16 +00:00
Anhad Singh 9928091aad fix(ci)
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-12 16:11:42 +11:00
Anhad Singh d3bab6eeee fix(redox: ld.so): unmap old TCB
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2024-12-12 16:00:11 +11:00