- Aug 12, 2020
-
-
Ahmed Abd El Mawgood authored
Usually it is possible to refer to library either by the file name or by elf "soname" soname is very similar for specifying something like (LIB/API version) combination so if for example you have ./prog that loads libx.so which is version 5.1.1 and there is ./plugin.so that ./prog would load that requires libx.so version 5.1.2 both libx.so should have the same soname to hint that they offer the exact same functionality. And this patch specifies the soname for relibc libc.so.
-
jD91mZM2 authored
Elf and flock See merge request redox-os/relibc!283
-
- Aug 11, 2020
-
- Aug 08, 2020
-
-
Jeremy Soller authored
Also weaken `__floattidf` See merge request !299
-
Ahmed Abd El Mawgood authored
struct flock is posix defined locking mechanism on *nix platform Example usage (copied from https://gavv.github.io/articles/file-locks/) : #include <fcntl.h> struct flock fl; memset(&fl, 0, sizeof(fl)); // lock in shared mode fl.l_type = F_RDLCK; // lock entire file fl.l_whence = SEEK_SET; // offset base is start of the file fl.l_start = 0; // starting offset is zero fl.l_len = 0; // len is zero, which is a special value representing end // of file (no matter how large the file grows in future) fl.l_pid = 0; // F_SETLK(W) ignores it; F_OFD_SETLK(W) requires it to be zero // F_SETLKW specifies blocking mode if (fcntl(fd, F_SETLKW, &fl) == -1) { exit(1); } // atomically upgrade shared lock to exclusive lock, but only // for bytes in range [10; 15) // // after this call, the process will hold three lock regions: // [0; 10) - shared lock // [10; 15) - exclusive lock // [15; SEEK_END) - shared lock fl.l_type = F_WRLCK; fl.l_start = 10; fl.l_len = 5; // F_SETLKW specifies non-blocking mode if (fcntl(fd, F_SETLK, &fl) == -1) { exit(1); } // release lock for bytes in range [10; 15) fl.l_type = F_UNLCK; if (fcntl(fd, F_SETLK, &fl) == -1) { exit(1); } // close file and release locks for all regions // remember that locks are released when process calls close() // on any descriptor for a lock file close(fd);
-
Ahmed Abd El Mawgood authored
-
- Aug 07, 2020
-
-
jD91mZM2 authored
- Aug 05, 2020
-
-
jD91mZM2 authored
-
- Aug 04, 2020
-
-
Jeremy Soller authored
Make linker work somewhat on Redox See merge request !296
-
Seems to collide with the program being loaded
-
- Aug 03, 2020
-
-
James Graves authored
Fixes link error with ion shell.
-
Jeremy Soller authored
-
- Aug 02, 2020
-
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
- Jul 30, 2020
-
-
Jeremy Soller authored
Make munmap use funmap2 See merge request redox-os/relibc!297
-
jD91mZM2 authored
-
jD91mZM2 authored
-
- Jul 25, 2020
-
-
- Jul 20, 2020
-
-
Jeremy Soller authored
-
- Jul 19, 2020
-
-
Jeremy Soller authored
Dlopen dlclose dlsym See merge request redox-os/relibc!290
-
Ahmed Abd El Mawgood authored
-
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
It is fact that ld.so has libc statially linked into it. Normally we wouldn't need ld.so functionality once the program is finalyl loaded, but with the next few patches, we will have dlopen which will reuse the same ld.so functionality. The problem is that it seams that huge part of the code is possible not referntially transparent. That is, it is not impossible that some of the functions have internals states. So when using the struct Linker that is initialized by ld.so's copy of libc. we must access it using the same copy even if both copies are identical. For example in dlopen if you do linker.load_library(..). That would segfault because it is using the function from libc not ld.so So I don't truly undestand why should this be needed, but after long hours of being stuck I thought maybe.. maybe that is the issue and indeed it turned out to be so.
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
I by mistake commented _dl_debug_state() function which would break debugging
-
Jeremy Soller authored
-
- Jul 18, 2020
-
-
Jeremy Soller authored
Allocator See merge request !295
-
-
Ahmed Abd El Mawgood authored
-