- Jul 19, 2020
-
-
Ahmed Abd El Mawgood authored
-
-
Ahmed Abd El Mawgood authored
-
- Jul 08, 2020
-
-
Wren Turkal authored
When a byte-oriented stream function touches a stream, that stream should be set to byte-oriented mode if it hasn't been set yet. If it has been set, the opertion should only succeed if the stream is already in byte-oriented mode. Signed-off-by:
Wren Turkal <wt@penguintechs.org>
-
Wren Turkal authored
Signed-off-by:
Wren Turkal <wt@penguintechs.org>
-
Wren Turkal authored
Signed-off-by:
Wren Turkal <wt@penguintechs.org>
-
Wren Turkal authored
This function is used to set the orientation of a stream to either byte-oriented or wchar-oriented. More info on this function is here: https://man7.org/linux/man-pages/man3/fwide.3p.html This implementation only impmlemnts the manual switching and does not yet guard against using a byte-oriented stream with wchar functions and vice versa. Those step will come in additional commits. Signed-off-by:
Wren Turkal <wt@penguintechs.org>
-
- Jun 29, 2020
-
- Jun 27, 2020
-
- Jun 25, 2020
-
- Jun 24, 2020
-
-
- Jun 23, 2020
-
-
Peter Limkilde Svendsen authored
-
- Jun 22, 2020
-
-
- Jun 14, 2020
-
-
Ahmed Abd El Mawgood authored
This was triggered by gcc for some reason It included sys/types.h and assumed sys/select.h to be there. And that seams to be the case in musl. The problem with relibc here is that sys/types.h is are part of relibc "include/*.h" files, while sys/select.h is generated by cbindgen. That makes it impossible to #include select.h in types.h epsecially that there are files like fcntl.c that uses types.h. They would complain about missing headers. I fixed this by renaming sys/types.h to sys/types_internal.h and then generating types.h using cbindgen as well except for that. however fcntl and dlmalloc can include types_internal instead of types.h
-
- Jun 07, 2020
-
-
Giuseppe Longo authored
This patch implements getnetbyname and getnetent functions.
-
- Jun 03, 2020
-
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
This is the behavior of glibc which I assume to be right
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
The LookAheadReader api works similar to read but it has 2 methods, lookahead: it will read 1 byte (with internal ftell) without modifying the file's own ftell() and commit() which saves the current file ftell LookAheadReader can wrap both buffers and files
-
Ahmed Abd El Mawgood authored
-
- May 28, 2020
-
-
Jeremy Soller authored
-
Peter Limkilde Svendsen authored
-
- May 26, 2020
-
-
Peter Limkilde Svendsen authored
-
- May 24, 2020
-
-
Peter Limkilde Svendsen authored
-
Peter Limkilde Svendsen authored
-
- May 23, 2020
-
-
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
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
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
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
-
- May 22, 2020
-
-
Jeremy Soller authored
-
Jeremy Soller authored
-
- May 08, 2020
-
-
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.
-
- Apr 26, 2020
-
-
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
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
-
-
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
-
-
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
-
- Apr 14, 2020
-
-
Graham MacDonald authored
-
- Apr 07, 2020
-
-
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.
-