• Home
Name Date Size #Lines LOC

..--

cmake/06-Sep-2024-375305

doc/06-Sep-2024-1,207871

fuzz/06-Sep-2024-17471

test_cases/06-Sep-2024-34,71531,841

testdata/06-Sep-2024-1,7891,613

Android.bpD06-Sep-20242.7 KiB121113

CMakeLists.txtD06-Sep-20244.4 KiB167137

CONTRIBUTING.mdD06-Sep-2024150 53

DockerfileD06-Sep-20241.5 KiB5553

LICENSED06-Sep-202412 KiB220182

METADATAD06-Sep-2024692 2018

MODULE_LICENSE_LLVMD06-Sep-20240

OWNERSD06-Sep-202440 32

README.mdD06-Sep-20243.1 KiB11074

abigail_reader.ccD06-Sep-202441.9 KiB1,3171,008

abigail_reader.hD06-Sep-20245.7 KiB16374

abigail_reader_test.ccD06-Sep-20247.1 KiB235195

btf_reader.ccD06-Sep-202415.6 KiB438354

btf_reader.hD06-Sep-20242.5 KiB9055

catch.ccD06-Sep-2024205 102

comparison.ccD06-Sep-202425.9 KiB811593

comparison.hD06-Sep-20249.1 KiB314236

deduplication.ccD06-Sep-20243.2 KiB11379

deduplication.hD06-Sep-20241 KiB3912

dwarf_processor.ccD06-Sep-202439.8 KiB1,089807

dwarf_processor.hD06-Sep-20241.6 KiB5827

dwarf_wrappers.ccD06-Sep-202415.4 KiB497369

dwarf_wrappers.hD06-Sep-20244.2 KiB14076

elf_loader.ccD06-Sep-202418 KiB551436

elf_loader.hD06-Sep-20242.4 KiB10265

elf_reader.ccD06-Sep-202415.9 KiB453322

elf_reader.hD06-Sep-20242.2 KiB6838

elf_reader_test.ccD06-Sep-20241.6 KiB5831

equality.hD06-Sep-20248 KiB252181

equality_cache.hD06-Sep-20247.6 KiB270211

error.hD06-Sep-20242.7 KiB13592

error_test.ccD06-Sep-2024970 3611

fidelity.ccD06-Sep-20246.9 KiB262203

fidelity.hD06-Sep-20242.3 KiB8952

file_descriptor.ccD06-Sep-20241.4 KiB5524

file_descriptor.hD06-Sep-20241.4 KiB5222

file_descriptor_test.ccD06-Sep-20241.7 KiB6936

filter.ccD06-Sep-20248.1 KiB299227

filter.hD06-Sep-20241.2 KiB4515

filter_test.ccD06-Sep-20243.3 KiB12294

fingerprint.ccD06-Sep-20246.4 KiB256184

fingerprint.hD06-Sep-20241.3 KiB4312

graph.ccD06-Sep-20244.5 KiB159118

graph.hD06-Sep-202422.9 KiB748624

hashing.hD06-Sep-20243.6 KiB13580

input.ccD06-Sep-20242.1 KiB7749

input.hD06-Sep-20241.1 KiB4013

naming.ccD06-Sep-20248.1 KiB309228

naming.hD06-Sep-20243.1 KiB10771

order.hD06-Sep-20247.3 KiB22581

order_test.ccD06-Sep-20249.3 KiB288224

post_processing.ccD06-Sep-20246.4 KiB203160

post_processing.hD06-Sep-20241 KiB3510

proto_reader.ccD06-Sep-202416.1 KiB502427

proto_reader.hD06-Sep-20241,013 3812

proto_writer.ccD06-Sep-202420.4 KiB627531

proto_writer.hD06-Sep-20241.1 KiB4216

reader_options.hD06-Sep-20241.3 KiB5626

reporting.ccD06-Sep-202414.8 KiB466365

reporting.hD06-Sep-20241.6 KiB6331

reporting_test.ccD06-Sep-20242.6 KiB7749

runtime.ccD06-Sep-20242.2 KiB8149

runtime.hD06-Sep-20242.4 KiB11677

runtime_test.ccD06-Sep-20243 KiB12597

scc.hD06-Sep-20244.5 KiB13553

scc_test.ccD06-Sep-20245.4 KiB206145

scope.hD06-Sep-20241.5 KiB6031

stable_hash.ccD06-Sep-20246 KiB190133

stable_hash.hD06-Sep-20241.9 KiB6737

stg.ccD06-Sep-20247.5 KiB247213

stg.protoD06-Sep-20246.5 KiB295258

stgdiff.ccD06-Sep-20248.6 KiB275230

stgdiff_test.ccD06-Sep-202411.3 KiB353297

substitution.hD06-Sep-20243.5 KiB15597

type_normalisation.ccD06-Sep-20245.8 KiB231163

type_normalisation.hD06-Sep-2024918 327

type_resolution.ccD06-Sep-20246.4 KiB250188

type_resolution.hD06-Sep-20241 KiB3711

unification.ccD06-Sep-20248.8 KiB292215

unification.hD06-Sep-20243.3 KiB13188

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