- Apr 24, 2020
-
-
Ahmed Abd El Mawgood authored
This patch implements sys/user.h file that works for both x86_64 as well as aarch64. This include file is used by sys/procfs.h which is needed dependency for binutils. There is bug in this patch in aarch64 implementation which is the lack of f128 implementation in rust, thus we can't create cbinding for long double.
-
- Apr 19, 2020
-
-
Jeremy Soller authored
Init fini ld.so See merge request !265
-
Ahmed Abd El Mawgood authored
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).
-
Ahmed Abd El Mawgood authored
This patch implements ld.so code that makes use of both .init_array and .fini_array. .init_array is fully utilized and is used in the correct manner. However .fini_array is not used yet although the function that runs .fini_array exists
-
Ahmed Abd El Mawgood authored
This patch implements tree-based data-structure for catching circular dependency where libA.so will depen on arbitrarily long chain (including zero length) of libNs.so one of which will depend on libA.so again. The main intention of this patch was merely capturing the dependency tree to prioterize which Elf's .init_array and which .fini_array should run first, but as a side effect it can capture circular dependencies as well.
-
- Apr 15, 2020
-
-
Jeremy Soller authored
Debugger support See merge request !263
-
Jeremy Soller authored
sigaction should set sigaction.sa_restorer See merge request !264
-
- Apr 14, 2020
-
-
Graham MacDonald authored
-
- Apr 13, 2020
-
-
Ahmed Abd El Mawgood authored
This patch makes use of the data structures and functions impelemented in the last patch to enable RTLD debugging protocol as per SVR4
-
Ahmed Abd El Mawgood authored
-
- Apr 10, 2020
-
-
Jeremy Soller authored
Remove vendored cbindgen, use cbindgen dependency to generate includes in build.rs See merge request !261
-
-
- Apr 07, 2020
-
-
Jeremy Soller authored
Use Kernel mapped binaries when available. See merge request redox-os/relibc!262
-
Ahmed Abd El Mawgood authored
At least in linux kernel, assuming that a.out is an elf that is linked against relibc's own ld.so. When a user attempts `./a.out`, Linux kernel will map `./a.out`, then map `ld.so` and jump into ld.so entry point. In relibc ld.so will simply ignore the kernel mapped a.out and create its own mapping. This patch forces relic ld.so to use the already mapped `a.out` when ever possible. This would normally have slight performance improvement (especially that currently relibc doesn't map a.out but instead copy the data into empty mmaped memory). The real motivation behind this patch is while impelemnting Runtime linker debugging protocol for relibc. part of the protocol is ld.so inseting address of some ld.so managed data structure into .dynamic seciton of a.out then the debugger would check it there. The thing is that debuggers have information about the kernel loaded ./a.out and they check that one specifically which is in our case totally ignored by relibc.
-
- Mar 30, 2020
-
-
Jeremy Soller authored
-
- Mar 25, 2020
-
-
Jeremy Soller authored
-
- Mar 19, 2020
-
-
Jeremy Soller authored
Weak symbols See merge request redox-os/relibc!260
-
- Mar 11, 2020
-
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
- Mar 08, 2020
-
-
Ahmed Abd El Mawgood authored
This patch keep 2 lists, one for strong symbols and one for weak symbols. First it will check for the symbol to be resolved in the strong symbols' list, if it is not there it will then check in the weak symbol list.
-
- Mar 07, 2020
-
-
Ahmed Abd El Mawgood authored
These files needs formating by the auto formatter and It keeps popping up every time I format my own code.
-
Ahmed Abd El Mawgood authored
This patch does basically two things: - First make `global` variable not public, And make it accessable via a function `get_sym`. - Isolate the procedure that collect global symbols into single function that does that and call it `collect_syms`. The motivation of this patch is the second one where this procedure is extended, thus it needs a seamless way to access those symbols
-
- Mar 06, 2020
-
-
Jeremy Soller authored
Stdc compatiability See merge request !258
-
- Mar 01, 2020
-
-
Ahmed Abd El Mawgood authored
I faced many issues when compiling libstdC++-V3 and linking against relibc mainly: - Missing types (max_align_t) - Different types definitions(ptrdiff_t , size_t) - and the fact that wchar_t is part of standard C++ and it seams that we canno redefine standard types
-
Ahmed Abd El Mawgood authored
-
- Feb 29, 2020
-
-
Jeremy Soller authored
-
Jeremy Soller authored
-
- Feb 24, 2020
-
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
Introduction: The original implementation of `relibc_ld_so_start` assumes that ld.so will always be invoked manually as in "/lib/ld64.so ./a.out" The problem is regarding this snippet. if sp.argc < 2 { eprintln!("ld.so [executable] [arguments...]"); unistd::_exit(1); loop {} } As such, In linux when user types "./a.out" he will recieve the message ld.so [executable] [arguments...] This patch makes use of AUXV, specifically AT_ENTRY. When invoking ld.so manually, AT_ENTRY happens to be the entry point of ld.so. But when running `./a.out` directly, AT_ENTRY becomes the entry point of `a.out` this patch compares AT_ENTRY to the entry point of ld.so, if they are equal only then it will assume that argv[1] is the real program and adjust the stack, otherwise it will proceed with the stack unadjusted.
-
- Feb 18, 2020
-
-
Jeremy Soller authored
Fix make libs in CI See merge request !256
-
- Feb 14, 2020
-
-
Ahmed Abd El Mawgood authored
There is no make libc ➜ relibc git:(master) make libc make: *** No rule to make target 'libc'. Stop.
-
- Feb 07, 2020
-
-
Jeremy Soller authored
Support AF_UNIX sockets See merge request redox-os/relibc!255
-
- Feb 06, 2020
-
-
Tiago authored
As with the previous commit, accept() was calling inner_get_name() and assuming only "tcp:" or "udp:" addresses would be received. Thus, in order to support AF_UNIX sockets, inner_get_name() was split into two, inner_af_inet() and inner_af_unix() - where the former keeps the previous logic, dealing with "tcp:" and "udp:" addresses, and the latter deals now with "chan:" addresses and filling in the sockaddr_un appropriately.
-
Tiago authored
Previously, domain AF_INET was assumed while processing bind() / connect(), which end up calling bind_or_connect!. Instead, match on the domain type and process the path for AF_UNIX domains.
-
Tiago authored
To add support for UNIX sockets (AF_UNIX), of SOCK_STREAM type, the "chan:" scheme is used, which will be supportedby the ipcd running in userspace. Later commits add similar AF_UNIX support for the rest of the methods in impl PalSocket.
-
Tiago authored
Future commits will make use of this, in order to support AF_UNIX sockets.
-
- Jan 29, 2020
-
-
Jeremy Soller authored
-
- Jan 28, 2020
-
-
Jeremy Soller authored
-