Name Date Size #Lines LOC

..--

cmake/H25-Apr-2025-375305

doc/H25-Apr-2025-1,9811,467

fuzz/H25-Apr-2025-18580

test_cases/H25-Apr-2025-34,69931,829

testdata/H25-Apr-2025-2,0581,874

Android.bpH A D25-Apr-20252.7 KiB122114

CMakeLists.txtH A D25-Apr-20254.5 KiB170140

CONTRIBUTING.mdH A D25-Apr-2025150 53

DockerfileH A D25-Apr-20251.5 KiB5553

LICENSEH A D25-Apr-202512 KiB220182

METADATAH A D25-Apr-2025692 2018

MODULE_LICENSE_LLVMHD25-Apr-20250

OWNERSH A D25-Apr-202540 32

README.mdH A D25-Apr-20253.1 KiB11074

abigail_reader.ccH A D25-Apr-202546.9 KiB1,4301,058

abigail_reader.hH A D25-Apr-20251.5 KiB5223

abigail_reader_test.ccH A D25-Apr-20257 KiB233193

btf_reader.ccH A D25-Apr-202516.5 KiB473377

btf_reader.hH A D25-Apr-20251.1 KiB4013

catch.ccH A D25-Apr-2025205 102

comparison.ccH A D25-Apr-202531.5 KiB981712

comparison.hH A D25-Apr-20253.2 KiB12982

deduplication.ccH A D25-Apr-20253.2 KiB11379

deduplication.hH A D25-Apr-20251 KiB3811

dwarf_processor.ccH A D25-Apr-202539.5 KiB1,085804

dwarf_processor.hH A D25-Apr-20251.6 KiB6128

dwarf_wrappers.ccH A D25-Apr-202513.6 KiB447331

dwarf_wrappers.hH A D25-Apr-20253.6 KiB11053

elf_dwarf_handle.ccH A D25-Apr-20253.2 KiB10869

elf_dwarf_handle.hH A D25-Apr-20251.6 KiB6230

elf_loader.ccH A D25-Apr-202517.8 KiB548433

elf_loader.hH A D25-Apr-20252.4 KiB10063

elf_reader.ccH A D25-Apr-202516.8 KiB468338

elf_reader.hH A D25-Apr-20252.2 KiB6939

elf_reader_test.ccH A D25-Apr-20251.6 KiB5730

equality.hH A D25-Apr-20258 KiB252181

equality_cache.hH A D25-Apr-20257.6 KiB270211

error.hH A D25-Apr-20252.6 KiB12682

error_test.ccH A D25-Apr-2025970 3611

fidelity.ccH A D25-Apr-20256.9 KiB262203

fidelity.hH A D25-Apr-20252.3 KiB8952

file_descriptor.ccH A D25-Apr-20251.4 KiB5625

file_descriptor.hH A D25-Apr-20251.4 KiB5222

file_descriptor_test.ccH A D25-Apr-20251.7 KiB6936

filter.ccH A D25-Apr-20257.9 KiB295224

filter.hH A D25-Apr-20251.2 KiB4515

filter_test.ccH A D25-Apr-20253.3 KiB12294

fingerprint.ccH A D25-Apr-20256.4 KiB256184

fingerprint.hH A D25-Apr-20251.3 KiB4211

graph.ccH A D25-Apr-20254.6 KiB162120

graph.hH A D25-Apr-202524.2 KiB806675

hashing.hH A D25-Apr-20253.4 KiB12875

hex.hH A D25-Apr-20251.5 KiB5829

hex_test.ccH A D25-Apr-20251.6 KiB7041

input.ccH A D25-Apr-20252.2 KiB7951

input.hH A D25-Apr-20251.1 KiB4013

naming.ccH A D25-Apr-20258.8 KiB345253

naming.hH A D25-Apr-20252.1 KiB8044

order.hH A D25-Apr-20257.3 KiB22581

order_test.ccH A D25-Apr-20259.3 KiB288224

post_processing.ccH A D25-Apr-20257.9 KiB255201

post_processing.hH A D25-Apr-2025953 338

proto_reader.ccH A D25-Apr-202517.1 KiB531453

proto_reader.hH A D25-Apr-20251 KiB3913

proto_writer.ccH A D25-Apr-202520.2 KiB619522

proto_writer.hH A D25-Apr-20251.1 KiB4216

reader_options.hH A D25-Apr-20251.3 KiB5626

reporting.ccH A D25-Apr-202514.9 KiB472369

reporting.hH A D25-Apr-20251.5 KiB6129

reporting_test.ccH A D25-Apr-20252.6 KiB7850

runtime.ccH A D25-Apr-20252.2 KiB8148

runtime.hH A D25-Apr-20252.4 KiB11677

runtime_test.ccH A D25-Apr-20253 KiB12597

scc.hH A D25-Apr-20254.7 KiB14157

scc_test.ccH A D25-Apr-20255.4 KiB205144

scope.hH A D25-Apr-20251.6 KiB6738

scope_test.ccH A D25-Apr-20251.4 KiB5933

stable_hash.ccH A D25-Apr-20256.3 KiB203143

stable_hash.hH A D25-Apr-20251.1 KiB4316

stg.ccH A D25-Apr-20257.5 KiB248214

stg.protoH A D25-Apr-20256.5 KiB296259

stgdiff.ccH A D25-Apr-20258.4 KiB268226

stgdiff_test.ccH A D25-Apr-202511.4 KiB371315

substitution.hH A D25-Apr-20253.6 KiB15597

type_normalisation.ccH A D25-Apr-20255.8 KiB232164

type_normalisation.hH A D25-Apr-2025916 327

type_resolution.ccH A D25-Apr-20256.4 KiB250188

type_resolution.hH A D25-Apr-20251 KiB3711

unification.ccH A D25-Apr-20259 KiB298219

unification.hH A D25-Apr-20253.2 KiB12986

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[[email protected]](mailto:[email protected]).
110