commit | 4ffc20011f1b68af77efec5a6f3b352248f7bc25 | [log] [tgz] |
---|---|---|
author | Giuliano Procida <gprocida@google.com> | Wed Dec 13 15:39:08 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Dec 13 15:39:08 2023 +0000 |
tree | 28f4a7080374fadd9599080be9c3d1d31bf01211 | |
parent | 156eff152f929489462cc398d6dad3c3fca8e06a [diff] | |
parent | 58b8885706207f2b5a81c653c1725179f5ea143b [diff] |
Merge branch 'upstream-main' into 'main' am: 5bd43d1a21 am: a9b09e7146 am: 58b8885706 Original change: https://android-review.googlesource.com/c/platform/external/stg/+/2873774 Change-Id: I080dac14b7a0b96007148fcd9d9a97506f95b412 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
The STG (symbol-type graph) is an ABI representation and this project contains tools for the creation and comparison of such representations.
The ABI extraction tool, stg
, emits a native ABI format. Parsers exist for libabigail's XML format, BTF and ELF / DWARF.
The ABI diff tool, stgdiff
, supports multiple reporting options.
STG has a versioned native file format. Older formats can be read and rewritten as the latest.
NOTE: STG is under active developement. Tool arguments and behaviour are subject to change.
We intend to package STG for major distributions. Currently we have packages as follows:
Distribution | Package |
---|---|
Arch Linux (AUR) | stg-git |
This source code is available at https://android.googlesource.com/platform/external/stg/.
Instructions are included for local and Docker builds.
STG is written in C++20. It is known to compile with GCC 11, Clang 15 or later versions.
Dependency | Debian | RedHat |
---|---|---|
build | cmake | cmake |
ELF, BTF | libelf-dev | elfutils-devel |
DWARF | libdw-dev | elfutils-devel |
XML | libxml2-dev | libxml2-devel |
BTF | linux-libc-dev | kernel-headers |
native format | libprotobuf-dev | protobuf-devel |
native format | protobuf-compiler | protobuf-compiler |
allocator[^1] | libjemalloc-dev | jemalloc-devel |
catch2[^2] | catch2 | catch2-devel |
[^1]: jemalloc is optional, but will likely improve performance. [^2]: catch2 is optional, but required to build the test suite.
Build STG using CMake as follows:
$ mkdir build && cd build $ cmake .. $ cmake --build . --parallel
Run the STG unit test suite:
$ ctest
A Dockerfile is provided to build a container with the STG tools:
$ docker build -t stg .
And then enter the container:
$ docker run -it stg
Note that the Dockerfile provides only a production image. To use Docker as a development environment, you can comment out everything after the line # second stage
.
After that you may 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.
See CONTRIBUTING.md for details.
Please send feedback, questions and bug reports to kernel-team@android.com.