- Jan 03, 2021
-
-
8tab authored
Instead of a single source of symbols, now linker keeps a list of DSO (former Library) objects with their own symbols map. That helps to process R_X86_64_COPY relocations correctly. For example, if 'a.out' executable with dependencies ['libstdc++.so', 'libc.so'] is being loaded and 'a.out' uses 'stdout' symbol from 'libc.so', its relocation process goes as follows: - linker processes relocation entry 'stdout' of type R_X86_64_GLOB_DAT from 'libc.so', - it goes through object list ['a.out', 'libstdc++.so', 'libc.so'] to find first object that exports 'stdout' symbol. The symbol is in 'a.out' with the value e.g. '0x404070', - linker sets 'stdout' symbol GOT entry in 'libc.so' to '0x404070', .... - linker processes relocation entry 'stdout' of type R_X86_64_COPY from 'a.out', - it goes through object list excluding 'a.out': ['libstdc++.so', 'libc.so']. The symbol is found in 'libc.so', - linker copies the 'stdout' symbol content from 'libc.so' to memory at address '0x404070' (in 'a.out' object). Objects are relocated in reverse order they were loaded. So in the example above, linker starts with relocating 'libc.so' and ends with 'a.out'. It is necessary e.g. when linking with 'libstdc++.so' - there are many relocations which symbols are found in 'libstdc++.so', so they need to be resolved before their contents are copied to 'a.out'. That also matches GNU ld.so behavior.
-
- Dec 24, 2020
-
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
- Dec 23, 2020
-
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
Jeremy Soller authored
-
- Oct 18, 2020
-
-
Jeremy Soller authored
Add submodules target to main makefile See merge request redox-os/relibc!323
-
Daniel Mangum authored
Adds a submodules convenience target to main makefile. Submodules must be initialized before other targets can run successfully. Signed-off-by:
hasheddan <georgedanielmangum@gmail.com>
-
- Oct 06, 2020
-
-
Jeremy Soller authored
-
- Oct 02, 2020
-
-
Jeremy Soller authored
Fix formatiing issues See merge request !316
-
Jeremy Soller authored
Add support for dlopen(NULL, ...) See merge request !315
-
Jeremy Soller authored
Fix tls tests for dynamic linker See merge request redox-os/relibc!317
-
- Oct 01, 2020
-
-
8tab authored
* load TLS segment for executable - while we can skip PT_LOAD for executable, we still have to load TLS segment. * set TCB address based on if elf is position independent
-
- Sep 30, 2020
-
-
8tab authored
-
8tab authored
-
Jeremy Soller authored
Add tests for ld_so See merge request redox-os/relibc!314
-
- Sep 29, 2020
- Sep 28, 2020
-
-
8tab authored
Typically it's the other way around, but we can't have shared library named libc.so.6 in target/release directory. cargo includes 'target/release' in LD_LIBRARY_PATH for build script, so even if clean build runs fine, every subsquent run will make build script link with relibc.
-
- Sep 17, 2020
-
-
Jeremy Soller authored
Catch UB in asctime_r() See merge request redox-os/relibc!312
-
Peter Limkilde Svendsen authored
-
Peter Limkilde Svendsen authored
-
Peter Limkilde Svendsen authored
-
Peter Limkilde Svendsen authored
-
- Sep 10, 2020
-
-
Jeremy Soller authored
-
- Sep 08, 2020
-
-
Jeremy Soller authored
Refactor gmtime_r(), fix localtime() test See merge request redox-os/relibc!309
-
Jeremy Soller authored
Add more gmtime() tests See merge request redox-os/relibc!308
-
-
Jeremy Soller authored
Avoid assuming c_char is i8 in asctime() See merge request redox-os/relibc!307
-
Jeremy Soller authored
Add needed include for asprintf() test See merge request redox-os/relibc!306
-
- Sep 06, 2020
-
-
Jeremy Soller authored
link: Weaken __rust_probestack symbol See merge request redox-os/relibc!310
-
Skallwar authored
-