Skip to content
Snippets Groups Projects
  1. Apr 07, 2020
    • Ahmed Abd El Mawgood's avatar
      Use Kernel mapped binaries when available. · cc305fc5
      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.
      cc305fc5
  2. Mar 08, 2020
    • Ahmed Abd El Mawgood's avatar
      Resolve Both strong and weak symbols · 4860ab12
      Ahmed Abd El Mawgood authored
      This patch keep 2 lists, one for strong symbols and one for weak
      symbols. First it will check for the symbol to be resolved in the strong
      symbols' list, if it is not there it will then check in the weak symbol
      list.
      4860ab12
  3. Mar 07, 2020
    • Ahmed Abd El Mawgood's avatar
      Refactor Linker::Link · 04ea2f93
      Ahmed Abd El Mawgood authored
      This patch does basically two things:
      - First make `global` variable not public, And make it accessable via a
      function `get_sym`.
      - Isolate the procedure that collect global symbols into single function
      that does that and call it `collect_syms`.
      
      The motivation of this patch is the second one where this procedure is
      extended, thus it needs a seamless way to access those symbols
      04ea2f93
  4. Feb 29, 2020
  5. Feb 24, 2020
  6. Dec 19, 2019
  7. Dec 18, 2019
  8. Dec 17, 2019
  9. Dec 15, 2019
  10. Dec 07, 2019
  11. Dec 01, 2019
  12. Aug 04, 2019
  13. Jul 04, 2019
  14. May 11, 2019
  15. Apr 21, 2019
  16. Apr 15, 2019
  17. Apr 14, 2019
  18. Apr 13, 2019
Loading