This is a big step to split revng-lift in two parts: one that only
writes the model and one that actually lifts to LLVM IR.
* Introduce `revng import binary`
* Split off `BinaryFile.h`
* Drop `revng.h`
* `GeneratedCodeBasicInfo`: use model
* Reduce role of `GeneratedCodeBasicInfo` in favor of
`model::Architecture` and `model::Register` methods
* `CodeGenerator`: adopt `RawBinaryView` and model
* `JumpTargetManager`: adopt `RawBinaryView` and model
* `ExternalJumpsHandler`: adopt model
* `InstructionTranslator`: discard `Architecture` in favor of
`EndianessMismatch`
* Many other changes
`raise_exception_helper` must not return to its caller. Should
`_Unwind_RaiseException` return, something will have gone wrong
with the personality routine; yet this should never happen.
This way we might also save a few bytes and hint the compiler to
avoid storing the callee-saved regs / allocating a new frame.
FunctionIsolation used to base its work on calls to the marker function
`function_call`, as opposed to information provided by the StackAnalysis
(i.e., `revng.member.type` along with `func.call`).
This also affected EnforceABI, which took care of finishing the work
left over by FunctionIsolation. This was hackish and inelegant.
This commit makes FunctionIsolation work exclusively employing
information from StackAnalysis and purges away code that is no longer
necessary from EnforceABI.
Fix an out-of-scope issue, where the `_Unwind_Exception` object was used
after the destruction of `raise_exception_helper`'s stackframe.
This issue has been addressed by placing the object into the `.bss`
segment.
The call to `exception_warning` in `support.c` is now performed
directly by the `raise_exception_helper` function defined in
`support.c`, so that we can avoid calling two different functions in the
translated and isolated module.
In `support.c`, we employ `arch_prctl` to set the value of segment
registers. However glibc, despite providing that function, doesn't
provide its prototype in any header file. This commit declares it,
according to the declaration provided in the man page.
This commit moves around most files. The new directory structure is as
follows:
* `lib/$LIBRARY/`: contains a library, i.e., a set of `.cpp` files used
by multiple libraries/tools.
* `include/revng/$LIBRARY/`: contains the public headers associated to
the library in `lib/$LIBRARY/`.
* `tools/$TOOL/`: directory where all the `.cpp` files (and private
headers) for a tool reside. Currently we have two tools: `revamb` and
`revamb-dump`.
On top of this, all file names are now in camel case.