No description
Find a file
2018-08-17 20:30:24 +02:00
dependency_graph Add dependency graph 2018-08-17 20:29:00 +02:00
README.md Include deps in README 2018-08-17 20:30:24 +02:00

General considerations about this internship

The goal of this internship was to investigate and implement a compiler from DWARF unwinding data to native assembly code. The various repositories listed on the git summary page are the various components of the project, plus some off-topic (at various degrees) code I wrote during the internship.

Each repository includes a README.md file with detailed information about what it does, how it is supposed to be used, etc.

List of repositories

  • abstract: this repository, provides a description/summary of the projects, and gives insights of how they interact with each other.

  • report: the internship report repository, including .tex files, images, source codes, etc.

  • libunwind-eh_elf: a fork of libunwind working with eh_elfs, with only a slight interface change (an additional parameter to an initialisation function).

  • dwarf-assembly: the compiler itself, along with benchmarking, stats and various helper scripts.

  • dwarf-semantics: a subset of report that describes the semantics of the compiled DWARF. Outdated.

  • pkgbuilds: contains PKGBUILD files for various uncommon libraries on which dwarf-assembly depends. A PKGBUILD is a package building script made for Archlinux.

  • perf-eh_elf: a fork of perf working with libunwind-eh_elf. Since perf is originally developed within the Linux kernel source tree, this repository was rerooted to only include tools/perf. However, to be compiled, perf needs the other files from the Linux source tree. See this repository's README.md for more details.

  • dwarfinterpret: a first project, providing features close to libunwind. This was made as an exercise with DWARF, to better understand how it works, at the beginning of the internship.

  • frame-machine: a fork of Stephen Kell's frame-machine.c. This was also made to better understand DWARF, and is a C++ template-based unwinder.

  • libdwarfpp-tests: some more training codes regarding DWARF. These codes use libdwarfpp, a library by Stephen Kell that acts as a C++ wrapper for libdwarf.

  • eh_frame_check_setup: a collection of scripts to automate and ease the use of eh_frame_check, a tool developed by Francesco Zappa-Nardelli, my advisor, to check the consistency and correctness of the DWARF unwinding data of arbitrary binaries. Outdated, as the up-to-date version can be found in the above-mentioned Github repository.

Dependency graph

Dependency graph - see the corresponding directory

Steps to setup the DWARF to assembly compiler

  • If you use Archlinux, install the three PKGBUILDs from pkgbuilds. If not, install the three libraries libsrk31cxx, libcxxfileno and libdwarfpp, all three by Stephen Kell. This can be tricky.

  • Clone the repository dwarf-assembly and run make. If the libraries from the previous step are installed and available in standard directories, this step should work without any particular problem.

  • From now on, you can compile ELFs to eh_elf. Follow the instructions from dwarf-assembly's README.md.

  • To use those eh_elfs, clone and build libunwind-eh_elf. Follow the instructions from the README.md.

  • To also use perf, clone and build perf-eh_elf and follow the instructions from the README.md.