- 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
-
-
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 !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 !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
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
-
Ahmed Abd El Mawgood authored
-
Jeremy Soller authored
Fix wrong TLS resolving See merge request !294
-
Ahmed Abd El Mawgood authored
I attempted fixing this issue before at 43fbaf99. Although it did work, it worked wrong, and it was just consistently working (but in wrong way) until it didn't. Since this is (hopefully) the real fix, I will try to explain exactly what is going on. This is explaination by example: our TLS is memory of size 0x1000 starting at 0x7ffff6c50000, but the real size is 0x000068 so we have padding stored at master.offset = 0xf98 Now our symbol looks as follows Offset Type Sym. Value Name 000000432b20 R_X86_64_DTPOFF64 0000000000000058 errno The old code did 0x7ffff6c50000 + 0xf98 + 000000432b20 which is obviosly overflowing the memory and wrong. The right way 0x7ffff6c50000 + 0xf98 + 0000000000000058. THe Tls base part and offset are added at __tls_get_addr function. What is left is storing the 0x58 at the relocation address. The problem is that we don't have 0x58, but we have (binary base + 0x58) in global symbol table and binary base so what we store is the (binarybase + 0x58 - binary base). I hope this does turn out to be wrong.
-
- Jul 15, 2020
-
-
jD91mZM2 authored
-
- Jul 09, 2020
-
-
Jeremy Soller authored
Add fwide function See merge request !291
-