Refresh README

Updated to mention:

* C++ type support
* ELF / DWARF reader
* extraction to native format
* additional dependencies
* C++20 and compiler versions
* Docker build no longer involves libabigail and is always multistage
* a contact address
* distributions and source code

PiperOrigin-RevId: 579811075
Change-Id: I5619feb241fdfd5bd4197cb45d504ba83d8e6d80
1 file changed
tree: a90118d0ecfbf22c8a92704ee13fa63b714d5bc2
  1. cmake/
  2. doc/
  3. fuzz/
  4. testdata/
  5. abigail_reader.cc
  6. abigail_reader.h
  7. abigail_reader_test.cc
  8. btf_reader.cc
  9. btf_reader.h
  10. catch.cc
  11. CMakeLists.txt
  12. comparison.cc
  13. comparison.h
  14. CONTRIBUTING.md
  15. deduplication.cc
  16. deduplication.h
  17. Dockerfile
  18. dwarf_processor.cc
  19. dwarf_processor.h
  20. dwarf_wrappers.cc
  21. dwarf_wrappers.h
  22. elf_loader.cc
  23. elf_loader.h
  24. elf_reader.cc
  25. elf_reader.h
  26. elf_reader_test.cc
  27. equality.h
  28. equality_cache.h
  29. error.h
  30. error_test.cc
  31. fidelity.cc
  32. fidelity.h
  33. file_descriptor.cc
  34. file_descriptor.h
  35. file_descriptor_test.cc
  36. filter.cc
  37. filter.h
  38. filter_test.cc
  39. fingerprint.cc
  40. fingerprint.h
  41. graph.cc
  42. graph.h
  43. hashing.h
  44. input.cc
  45. input.h
  46. LICENSE
  47. METADATA
  48. metrics.cc
  49. metrics.h
  50. metrics_test.cc
  51. MODULE_LICENSE_LLVM
  52. naming.cc
  53. naming.h
  54. order.h
  55. order_test.cc
  56. OWNERS
  57. post_processing.cc
  58. post_processing.h
  59. proto_reader.cc
  60. proto_reader.h
  61. proto_writer.cc
  62. proto_writer.h
  63. reader_options.h
  64. README.md
  65. reporting.cc
  66. reporting.h
  67. reporting_test.cc
  68. scc.h
  69. scc_test.cc
  70. scope.h
  71. stable_hash.cc
  72. stable_hash.h
  73. stg.cc
  74. stg.proto
  75. stgdiff.cc
  76. stgdiff_test.cc
  77. stginfo.cc
  78. substitution.h
  79. type_normalisation.cc
  80. type_normalisation.h
  81. type_resolution.cc
  82. type_resolution.h
  83. unification.cc
  84. unification.h
README.md

Symbol-Type Graph (STG)

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.

Getting STG

Distributions

We intend to package STG for major distributions. Currently we have packages as follows:

DistributionPackage
Arch Linux (AUR)stg-git

Source Code

This source code is available at https://android.googlesource.com/platform/external/stg/.

Building from Source

Instructions are included for local and Docker builds.

Dependencies

STG is written in C++20. It is known to compile with GCC 11, Clang 14 or later versions.

DependencyDebianRedHat
buildcmakecmake
ELF, BTFlibelf-develfutils-devel
DWARFlibdw-develfutils-devel
XMLlibxml2-devlibxml2-devel
BTFlinux-libc-devkernel-headers
native formatlibprotobuf-devprotobuf-devel
native formatprotobuf-compilerprotobuf-compiler
allocator[^1]libjemalloc-devjemalloc-devel

[^1]: jemalloc is optional but will likely improve performance.

Local Build

Build STG using CMake as follows:

$ mkdir build && cd build
$ cmake ..
$ cmake --build . --parallel

Docker Build

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.

Contributions

See CONTRIBUTING.md for details.

Contact Information

Please send feedback, questions and bug reports to kernel-team@android.com.