- Oct 28, 2017
-
-
Alessandro Di Federico authored
A previous commit introduced `-no-pie` to disable PIE in GCC versions higher than 5.2. However, earlier versions don't support such an option. This commit introduces the necessary detection mechanism to enable it or not.
-
- Aug 28, 2017
-
-
Pietro Fezzardi authored
Add this flag to the flags used for Runtime tests and to the flags used in the translate script. Recent GCC versions (`gcc-7` and later) enable PIE by default, and `-fno-pie` apparently is not enough to disable it.
-
- Aug 12, 2017
-
-
Alessandro Di Federico authored
The stack analysis is the foundation to obtain accurate information about the body of a function, which registers are callee-saved, arguments, return values and so on. It is implemented as a pass to run in revamb-dump. This commit also introduces analysis tests specific to what we aim to obtain from the analysis and also some basic unit tests for data structures related to the stack analysis.
-
Alessandro Di Federico authored
This commit introduces the unit test infrastructure, and a first unit test suite for `LazySmallBitVector`.
-
Alessandro Di Federico authored
-
- Mar 31, 2017
-
-
Alessandro Di Federico authored
Landing pads are basically the `catch` blocks in C++ `try`/`catch` statements. So far we were missing them since they are encoded in a particular way in a way similar to DWARF debugging information in the `.eh_frame` and, more specifically, in the `.gcc_except_table` sections of ELF programs. This commit parses these sections so that the basic blocks associated to landing pads are correctly identified. Personality functions are detected too. A test is also introduced to assess the effectiveness of our code.
-
- Mar 29, 2017
-
-
Alessandro Di Federico authored
Since we now support disjoint ranges in ORSA, let's test it. This commit also introduces some license disclaimers in tests assembly files.
-
- Dec 08, 2016
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
So far we only had end-to-end functionality testing. This commit introduces a new part of the testsuite which allows to verify quickly if the results that a certain analysis should give are changed or not. This is vital to be able to make larger changes. So far the test suite is composed by the most difficult case we support (the uClibc ARM memset) and the typical lowering of switch statements for ARM, MIPS and x86-64. I'm so happy now.
-
- Dec 03, 2016
-
-
Alessandro Di Federico authored
* Add a label for runtime and analysis tests * Add support for per-test custom compile flags
-
Alessandro Di Federico authored
So far the only tests we had were end to end tests to assess the functionality of simple programs and, in particular, certain helper functions. In the perspective of being able to test individual features, and in particular check that we have no regressions in our analyses, we isolated these end to end tests in the Runtime directory. We kept in the root test directory the mechanism to compile a binary for a certain architecture so that all the test types can use it.
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
This commit removes all the ELF-specific code from the `CodeGenerator` class by creating a new class, `BinaryFile` which contains all the information about the program that might be needed in an image format independent way. However, `BinaryFile` has some fields which are specific to ELF, we might want to address this when additional file formats are supported. A key benefit of isolating this code is that we can anticipate the parsing of the input file, so that we have its architecture available earlier than when `CodeGenerator` is instantiated, therefore we can drop the `--architecture` parameter.
-
- Sep 22, 2016
-
-
Alessandro Di Federico authored
* Use "$ORIGIN/../lib/" as RPATH when linking the installed binary * Install also support material such as "support.c" * Import the `translate` script for easy end-to-end translation
-
Alessandro Di Federico authored
Add different search paths for QEMU components, in paritcular relative to the program's path. Also, install the revamb.
-
- Sep 20, 2016
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
The `path` function allows support.c to decide how to modify the path opened by the translated program.
-
Alessandro Di Federico authored
* Disable PIE if enabled by default * Link librt.so to compiled binaries (sometimes the QEMU runtime needs it) * Replace `strtonum` with `int` in `awk` script * Specify the compiler, not the triple
-
Alessandro Di Federico authored
Check in PATH if there's a compiler compatible with the supported ones (i.e., using uclibc or musl) and use that triple.
-
- Sep 17, 2016
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
- Aug 20, 2016
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
- Apr 14, 2016
-
-
Alessandro Di Federico authored
`unknownPC` is an extern function we expect to be linked to the output which is called when we have to crash due to an unexpected jump target. * Remove unused references to register variables, now only need the stack pointer * Fix bug in how the auxiliary values were pushed on the stack. * Push 0 HW_CAPs * Implement some glib's functions
-
- Jan 30, 2016
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
* Create 3 constant global variables (`phdr_address`, `e_phentsize` and `e_phnum`) in the IR which will be used to populate the auxiliary vectors at run-time. * Update compile options for `support.c` to ignore useless warnings and enable debug information * Implement in `support.c` some functions required by QEMU run-time and other cleanups to make it compatible with programs translated from `_start`, not `root` * Implement in `support.c` the `prepare_stack` function, which initializes the base of the stack with environment variables, arguments and auxiliary vectors * Improve syscall support
-
Alessandro Di Federico authored
-
- Jan 12, 2016
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
- Jan 09, 2016
-
-
Alessandro Di Federico authored
* s/`importGlobalData`/`parseELF`/ * Save the entry point specified in the ELF header, which will be used if the user doesn't provide an address. * Let parse `parseELF` take care of informing libtinycode about what has to be mmap'd and where. * Remove some support scripts used during testing, now no longer necessary. * Various cleanups
-
- Jan 07, 2016
-
-
Alessandro Di Federico authored
-
- Jan 04, 2016
-
-
Alessandro Di Federico authored
-
- Dec 04, 2015
-
-
Alessandro Di Federico authored
-
- Nov 15, 2015
-
-
Alessandro Di Federico authored
The main aim of these changes is to support `ret` instructions (that are indirect jumps), so that function calls can now work properly. * Emit a dummy call to a `@newPC` function to record where a new instruction in the original assembly started, what is its PC and its size. The `Size` parameter for these function call is initially zero, and it's updated later when a new instruction is met or the current basic block is terminated. All these calls, before the final emission of the IR are removed `InstructionTranslator::removeNewPCMarkers`. * Transform translateMoveToPC into an LLVM pass (`TranslateDirectBranchesPass`). * Implement `getNextPC`, which returns the next program counter by looking for a call to `@newpc` in the current basic block, and, recursively, in all the basic blocks dominating the current one. This function is used to force exploration of the basic block coming after a direct jump, which is paritcularly useful in case of a function call. * Introduce `translateIndirectJumps`, which translates all the leftover writes to the PC, i.e. all the indirect ones, by diverting execution to a large switch statement mapping addresses in the original program to the corresponding basic blocks in the translated program. * Introduce `function_call`, a simple test for function calls. * Other minor changes and whitespace fixes.
-
- Nov 10, 2015
-
-
Alessandro Di Federico authored
First time all tests pass!
-
- Nov 09, 2015
-
-
Alessandro Di Federico authored
* mmap on the PTC side before doing any translation * Update usages of virtual addresses * Refactor options to have --load-at and --entry * Update tests according to the changes
-