- May 23, 2020
-
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
as it seams you can do something like printf ("A%*s%s/\n", -5, "B", "CC"); and it will print the padding to the left
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
Scanf function requires look ahead to function properly, In case of scanning from a buffer that will not be an issue, but in our case we are reading from file, so lookaheads needs to be undone (via lseek) in our case. The only problem here is that if we opened a file that doesn't support lseek such as many of the file /dev/*
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
At least in relibc, each call to ungetc should decrement ftell() by one also allowing negative ftell() this is not possible on relibc thus gcc failing to compile (gcc compiles tools that is later used to compile gcc itself and these tools are the ones that fail)
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
According to the standards, only one ungetc may be guaranteed however glibc allows more than one of those, and to be glibc compatiable, one needs to be able to do the same, allowing only 1 ungetc may trigger bug while compiling gcc as ungetc is used there alot
-
Ahmed Abd El Mawgood authored
Normally one shouldn't be using this datatype ever, but then someone have to tell that to gcc folks :(
-
- May 22, 2020
-
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
- May 21, 2020
-
-
Jeremy Soller authored
- May 13, 2020
-
-
Jeremy Soller authored
Binutils regressions See merge request !269
-
Ahmed Abd El Mawgood authored
There was a bug (also uncovered via binutils) where R_X86_64_DTPOFF64 is set uncorrectly. This program is the minimal reproducer of the seg fault #include <errno.h> int main() { int oerrno = errno; } But it works after the bug fix.
-
- May 08, 2020
-
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
There was bug in printf where space paddings cause segfault, the problem was that it was pulled from the stack twice while it should be only done once.
-
Ahmed Abd El Mawgood authored
In patch 1182d120, I mistakingly added the size of the gap to the total size of the binary, which was not accurate. As the size of the binary was calculate by subtracting the upperbound from the lower bound, thus all gaps in the middle are taking into account.
-
- May 03, 2020
-
-
Jeremy Soller authored
Ld.so regressions See merge request !268
-
Ahmed Abd El Mawgood authored
This fixes a regression in gdb where sometimes it decides to ignore the first entry in the list.
-
Ahmed Abd El Mawgood authored
I noticed that the implementation is noth precise although it worked. and instead of using the sections to identify memory addresses of DT_DEBUG. I used segements
-
Ahmed Abd El Mawgood authored
Some ELFs can have gaps between the segments, this results in problems when mprotecting or when converting (addr + size) into rust slice. Motivated by this This patch will fill these gaps with mmaped addresses. In theory no real memory should be allocated because mmap is lazy allocator.
-
- May 02, 2020
-
-
Jeremy Soller authored
Wide strings Functions See merge request !267
-
- Apr 26, 2020
-
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
This patch implements wcscasecmp and wcsncasecmp. These two function are required for binutils to link against relibc.
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
This patch creates wctype.h and impelementat two functions that belong to that header file towupper and towlower. These functions are building blocks for wcscasecmp and wcsncasecmp which are utilized by binutils. The implementation for towlower and towupper seams to be complex so this implementation is mimicking that of musl libc
-
- Apr 24, 2020
-
-
Jeremy Soller authored
Implement #include<sys/user.h> and #include<sys/procfs.h> See merge request !266
-
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 redox-os/relibc!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 redox-os/relibc!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
-