| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| cmake/ | 06-Sep-2024 | - | 375 | 305 | ||
| doc/ | 06-Sep-2024 | - | 1,207 | 871 | ||
| fuzz/ | 06-Sep-2024 | - | 174 | 71 | ||
| test_cases/ | 06-Sep-2024 | - | 34,715 | 31,841 | ||
| testdata/ | 06-Sep-2024 | - | 1,789 | 1,613 | ||
| Android.bp | D | 06-Sep-2024 | 2.7 KiB | 121 | 113 | |
| CMakeLists.txt | D | 06-Sep-2024 | 4.4 KiB | 167 | 137 | |
| CONTRIBUTING.md | D | 06-Sep-2024 | 150 | 5 | 3 | |
| Dockerfile | D | 06-Sep-2024 | 1.5 KiB | 55 | 53 | |
| LICENSE | D | 06-Sep-2024 | 12 KiB | 220 | 182 | |
| METADATA | D | 06-Sep-2024 | 692 | 20 | 18 | |
| MODULE_LICENSE_LLVM | D | 06-Sep-2024 | 0 | |||
| OWNERS | D | 06-Sep-2024 | 40 | 3 | 2 | |
| README.md | D | 06-Sep-2024 | 3.1 KiB | 110 | 74 | |
| abigail_reader.cc | D | 06-Sep-2024 | 41.9 KiB | 1,317 | 1,008 | |
| abigail_reader.h | D | 06-Sep-2024 | 5.7 KiB | 163 | 74 | |
| abigail_reader_test.cc | D | 06-Sep-2024 | 7.1 KiB | 235 | 195 | |
| btf_reader.cc | D | 06-Sep-2024 | 15.6 KiB | 438 | 354 | |
| btf_reader.h | D | 06-Sep-2024 | 2.5 KiB | 90 | 55 | |
| catch.cc | D | 06-Sep-2024 | 205 | 10 | 2 | |
| comparison.cc | D | 06-Sep-2024 | 25.9 KiB | 811 | 593 | |
| comparison.h | D | 06-Sep-2024 | 9.1 KiB | 314 | 236 | |
| deduplication.cc | D | 06-Sep-2024 | 3.2 KiB | 113 | 79 | |
| deduplication.h | D | 06-Sep-2024 | 1 KiB | 39 | 12 | |
| dwarf_processor.cc | D | 06-Sep-2024 | 39.8 KiB | 1,089 | 807 | |
| dwarf_processor.h | D | 06-Sep-2024 | 1.6 KiB | 58 | 27 | |
| dwarf_wrappers.cc | D | 06-Sep-2024 | 15.4 KiB | 497 | 369 | |
| dwarf_wrappers.h | D | 06-Sep-2024 | 4.2 KiB | 140 | 76 | |
| elf_loader.cc | D | 06-Sep-2024 | 18 KiB | 551 | 436 | |
| elf_loader.h | D | 06-Sep-2024 | 2.4 KiB | 102 | 65 | |
| elf_reader.cc | D | 06-Sep-2024 | 15.9 KiB | 453 | 322 | |
| elf_reader.h | D | 06-Sep-2024 | 2.2 KiB | 68 | 38 | |
| elf_reader_test.cc | D | 06-Sep-2024 | 1.6 KiB | 58 | 31 | |
| equality.h | D | 06-Sep-2024 | 8 KiB | 252 | 181 | |
| equality_cache.h | D | 06-Sep-2024 | 7.6 KiB | 270 | 211 | |
| error.h | D | 06-Sep-2024 | 2.7 KiB | 135 | 92 | |
| error_test.cc | D | 06-Sep-2024 | 970 | 36 | 11 | |
| fidelity.cc | D | 06-Sep-2024 | 6.9 KiB | 262 | 203 | |
| fidelity.h | D | 06-Sep-2024 | 2.3 KiB | 89 | 52 | |
| file_descriptor.cc | D | 06-Sep-2024 | 1.4 KiB | 55 | 24 | |
| file_descriptor.h | D | 06-Sep-2024 | 1.4 KiB | 52 | 22 | |
| file_descriptor_test.cc | D | 06-Sep-2024 | 1.7 KiB | 69 | 36 | |
| filter.cc | D | 06-Sep-2024 | 8.1 KiB | 299 | 227 | |
| filter.h | D | 06-Sep-2024 | 1.2 KiB | 45 | 15 | |
| filter_test.cc | D | 06-Sep-2024 | 3.3 KiB | 122 | 94 | |
| fingerprint.cc | D | 06-Sep-2024 | 6.4 KiB | 256 | 184 | |
| fingerprint.h | D | 06-Sep-2024 | 1.3 KiB | 43 | 12 | |
| graph.cc | D | 06-Sep-2024 | 4.5 KiB | 159 | 118 | |
| graph.h | D | 06-Sep-2024 | 22.9 KiB | 748 | 624 | |
| hashing.h | D | 06-Sep-2024 | 3.6 KiB | 135 | 80 | |
| input.cc | D | 06-Sep-2024 | 2.1 KiB | 77 | 49 | |
| input.h | D | 06-Sep-2024 | 1.1 KiB | 40 | 13 | |
| naming.cc | D | 06-Sep-2024 | 8.1 KiB | 309 | 228 | |
| naming.h | D | 06-Sep-2024 | 3.1 KiB | 107 | 71 | |
| order.h | D | 06-Sep-2024 | 7.3 KiB | 225 | 81 | |
| order_test.cc | D | 06-Sep-2024 | 9.3 KiB | 288 | 224 | |
| post_processing.cc | D | 06-Sep-2024 | 6.4 KiB | 203 | 160 | |
| post_processing.h | D | 06-Sep-2024 | 1 KiB | 35 | 10 | |
| proto_reader.cc | D | 06-Sep-2024 | 16.1 KiB | 502 | 427 | |
| proto_reader.h | D | 06-Sep-2024 | 1,013 | 38 | 12 | |
| proto_writer.cc | D | 06-Sep-2024 | 20.4 KiB | 627 | 531 | |
| proto_writer.h | D | 06-Sep-2024 | 1.1 KiB | 42 | 16 | |
| reader_options.h | D | 06-Sep-2024 | 1.3 KiB | 56 | 26 | |
| reporting.cc | D | 06-Sep-2024 | 14.8 KiB | 466 | 365 | |
| reporting.h | D | 06-Sep-2024 | 1.6 KiB | 63 | 31 | |
| reporting_test.cc | D | 06-Sep-2024 | 2.6 KiB | 77 | 49 | |
| runtime.cc | D | 06-Sep-2024 | 2.2 KiB | 81 | 49 | |
| runtime.h | D | 06-Sep-2024 | 2.4 KiB | 116 | 77 | |
| runtime_test.cc | D | 06-Sep-2024 | 3 KiB | 125 | 97 | |
| scc.h | D | 06-Sep-2024 | 4.5 KiB | 135 | 53 | |
| scc_test.cc | D | 06-Sep-2024 | 5.4 KiB | 206 | 145 | |
| scope.h | D | 06-Sep-2024 | 1.5 KiB | 60 | 31 | |
| stable_hash.cc | D | 06-Sep-2024 | 6 KiB | 190 | 133 | |
| stable_hash.h | D | 06-Sep-2024 | 1.9 KiB | 67 | 37 | |
| stg.cc | D | 06-Sep-2024 | 7.5 KiB | 247 | 213 | |
| stg.proto | D | 06-Sep-2024 | 6.5 KiB | 295 | 258 | |
| stgdiff.cc | D | 06-Sep-2024 | 8.6 KiB | 275 | 230 | |
| stgdiff_test.cc | D | 06-Sep-2024 | 11.3 KiB | 353 | 297 | |
| substitution.h | D | 06-Sep-2024 | 3.5 KiB | 155 | 97 | |
| type_normalisation.cc | D | 06-Sep-2024 | 5.8 KiB | 231 | 163 | |
| type_normalisation.h | D | 06-Sep-2024 | 918 | 32 | 7 | |
| type_resolution.cc | D | 06-Sep-2024 | 6.4 KiB | 250 | 188 | |
| type_resolution.h | D | 06-Sep-2024 | 1 KiB | 37 | 11 | |
| unification.cc | D | 06-Sep-2024 | 8.8 KiB | 292 | 215 | |
| unification.h | D | 06-Sep-2024 | 3.3 KiB | 131 | 88 |
README.md
1# Symbol-Type Graph (STG) 2 3The STG (symbol-type graph) is an ABI representation and this 4project contains tools for the creation and comparison of such 5representations. 6 7The ABI extraction tool, `stg`, emits a native ABI format. Parsers exist for 8libabigail's XML format, BTF and ELF / DWARF. 9 10The ABI diff tool, `stgdiff`, supports multiple reporting options. 11 12STG has a versioned native file format. Older formats can be read and 13rewritten as the latest. 14 15NOTE: STG is under active developement. Tool arguments and behaviour are 16subject to change. 17 18## Getting STG 19 20### Distributions 21 22We intend to package STG for major distributions. Currently we have 23packages as follows: 24 25| *Distribution* | *Package* | 26| ---------------- | ----------------------------------------------------- | 27| Arch Linux (AUR) | [stg-git](https://aur.archlinux.org/packages/stg-git) | 28 29### Source Code 30 31This source code is available at 32https://android.googlesource.com/platform/external/stg/. 33 34## Building from Source 35 36Instructions are included for local and Docker builds. 37 38### Dependencies 39 40STG is written in C++20. It is known to compile with GCC 11, Clang 15 or 41later versions. Mininum requirements for a local build are: 42 43| *Dependency* | *Debian* | *RedHat* | *Version* | 44| ------------- | ----------------- | ----------------- | --------- | 45| build | cmake | cmake | 3.14 | 46| ELF, BTF | libelf-dev | elfutils-devel | 0.189 | 47| DWARF | libdw-dev | elfutils-devel | 0.189 | 48| XML | libxml2-dev | libxml2-devel | 2.9 | 49| BTF | linux-libc-dev | kernel-headers | 5.19 | 50| native format | libprotobuf-dev | protobuf-devel | 3.19 | 51| native format | protobuf-compiler | protobuf-compiler | 3.19 | 52| allocator[^1] | libjemalloc-dev | jemalloc-devel | 5 | 53| catch2[^2] | catch2 | catch2-devel | 2 (only) | 54 55[^1]: jemalloc is optional, but will likely improve performance. 56[^2]: catch2 is optional, but required to build the test suite. 57 58### Local Build 59 60Build STG using CMake as follows: 61 62```bash 63$ mkdir build && cd build 64$ cmake .. 65$ cmake --build . --parallel 66``` 67 68Run the STG unit test suite: 69 70```bash 71$ ctest 72``` 73 74### Docker Build 75 76A [Dockerfile](Dockerfile) is provided to build a container with the 77STG tools: 78 79```bash 80$ docker build -t stg . 81``` 82 83And then enter the container: 84 85```bash 86$ docker run -it stg 87``` 88 89Note that the Dockerfile provides only a production image. To use 90Docker as a development environment, you can comment out everything 91after the line `# second stage`. 92 93After that you may bind your development code to the container: 94 95```bash 96$ docker run -it $PWD:/src -it stg 97``` 98 99The source code is added to `/src`, so when your code is bound you can 100edit on your host and re-compile in the container. 101 102## Contributions 103 104See [CONTRIBUTING.md](CONTRIBUTING.md) for details. 105 106## Contact Information 107 108Please send feedback, questions and bug reports to 109[kernel-team@android.com](mailto:kernel-team@android.com). 110