This commit ensures that FunctionIsolation and EnforceABI do only
thing. This means that they no longer modify `root`.
Instead, we have a new pass, `invoke-isolated-functions` that needs to
be run after them and replaces the entry point of the functions with
invokes to the isolated functions, possibly with the appropriate
arguments.
The `revng` script looks in several paths for analysis
libraries. However, before this commit, in case multiple versions of the
same library were available, you'd get unpredictable results.
This commit ensures that each library is considered at most once, in the
right order.
We now employ `argparse` subparsers.
This commit also fixes a bug involving global options with an argument
(such as `--prefix`) that led the argument to be interpreted as the
subcommand.
`--prefix` enables projects using revng to easily and correctly employ
libraries available in build directories organized in a install
tree-like fashion.
This commit drops support for running StackAnalysis without ABI
analysis. This has been broken for quite some time and a source of slow
downs in (badly) crafted optimization pipelines.
Notable changes:
- Split in multiple files the existing revng-merge-dynamic script
- Add the option to merge additional LOAD segments in the resulting
binary
- Align the new .dynstr to a 4 byte boundary
- Ensure the last verneed entry is marked as such (vn_next == 0)
- Ensure LOAD PHDRs are listed in ascending order,
as mandated by ELF spec
This enables running the check-revng-conventions script as part of the
build and install process, to generate the .clang-format file for
installation and use from other projects.
This option is enabled with --print-clang-format-config.
This is useful to work around the fact that clang-format configuration
is hard-coded in a file.
Using this option is easier to generate a .clang-format file that can be
dropped in single projects to be picked up by IDE.
The format file has also been renamed to revng-clang-format-style-file.
The check-revng-conventions scripts now always uses the same format
file, unless otherwise specified with the new option
--use-local-clang-format-file.
In this way, the check-revng-conventions uses the same format in all the
projects by default, but if a project needs to customize it (e.g.
cold-revng which follows the Qt style) it can use the new flag to
fallback to using the local .clang-format file.
Before this commit, the exit status was not really taken care of.
Now the exit status is set to error whenever some of the checks fail,
and to success only if all the checks succeed.
This commit adds two helper functions that run two set of checks:
- `run_clang_format` runs clang format
- `run_revng_checks` runs revng-specific checks
This is a preliminary commit to ease extension of `check-conventions.sh`
so that it can be better integrated with bash scripts and git hooks.
We now make use of the `__gxx_personality_v0` personality function to
handle the exception behavior.
For this reason, we now need to use a c++ compiler for linking the final
module after the translation process of a binary.