commit | ad8e0a5eb946febb9dd3ae27f7260bae8bf69b63 | [log] [tgz] |
---|---|---|
author | Giuliano Procida <gprocida@google.com> | Tue May 16 16:59:03 2023 +0100 |
committer | Giuliano Procida <gprocida@google.com> | Tue May 16 16:59:03 2023 +0100 |
tree | e380facd9f760c1169699fb81a345b98a0b3d990 | |
parent | cceb6a78f3c958ff93abdad8adac6383e7d03862 [diff] | |
parent | e43971671d31b445e71e9765ea4e0f958cd0585d [diff] |
Merge branch 'upstream-master' into 'master' * aosp/upstream-master: stg: remove ability to emit unstable output type_roots: Update `stg` and `stgdiff` documentation type_roots: Die when merge is requested on interfaces with type roots type_roots: Add flag to `stg` and `stgdiff` tools for capturing types as roots Abigail reader: remove useless qualifiers Abigail reader: add XML tidying functionality Abigail reader: strip non-elements before parsing XML Abigail reader: forbid network access during XML parsing Abigail reader: make `FromLibxml` and `GetName` return `string_view` Abigail reader: use GetName consistently Abigail reader: shorten a couple of helper function names Abigail reader: GetAttributeOrDie: make a local string const stgdiff.md: fix typo in --exact section type_roots: Populate type roots while reading ELF Abigail reader: add some function description comments Abigail reader: GetOnlyChild: eliminate name argument Abigail reader: GetAttribute: assign optional<string> using emplace Abigail reader: use Die rather than Check in GetOnlyChild Abigail reader: update is-declaration-only handling comment Abigail reader: add short-named helpers for child iteration Abigail reader: use auto* child element iteration loop variable type type_roots: Add `ReadOptions` struct for ELF reader type_roots: Emit `Interface` node from the proto writer fix some const correctness issues type_roots: Add `Interface` node to STG protobuf definitions proto: make `Symbols` node repeated in the format for consistency type_roots: Add types map to `Interface` node comparison: move static functions into anonymous namespace Signed-off-by: Giuliano Procida <gprocida@google.com> Change-Id: I5c544d452661ff98bf3affa41e4b8c9efb9caf52
The STG (symbol-type graph) is an ABI representation and this project contains tools for the creation and comparison of such representations. At present parsers exist for libabigail's ABI XML (C types only) and BTF. The ABI diff tool, stgdiff, supports multiple reporting options.
This software currently depends on libxml2 for XML parsing, on libelf to find .BTF sections and on Linux UAPI headers for BTF types.
To build from source, you will need a few dependencies:
Debian | RedHat |
---|---|
libelf-dev | elfutils-devel |
libxml2-dev | libxml2-devel |
linux-libc-dev | kernel-headers |
Instructions are included for local and Docker builds.
You can build as follows:
$ make
A Dockerfile is provided to build a container with libabigail to easily compile the STG tools:
$ docker build -t stg .
And then enter the container:
$ docker run -it stg
If you want to bind your development code to the container:
$ docker run -it $PWD:/src -it stg
The source code is added to /src
, so when your code is bound you can edit on your host and re-compile in the container.
Note that the Dockerfile can provide a development environment (non multi-stage build with the source code) or a production image (a multi-stage build with only the final binary). By default we provide the first, and you can uncomment the final lines of the file for the latter.
See CONTRIBUTING.md for details.