c++ - 用于检测 C++ 中 ABI 中断的静态分析工具

标签 c++ shared-libraries static-analysis backwards-compatibility

打破带有 C++ 接口(interface)的 DSO/共享库的二进制向后兼容性并不难。也就是说,是否有一个静态分析工具可以帮助检测这种 ABI 中断,如果它有两组不同的头文件:DSO 的早期状态和当前状态的那些(也许还有 DSO)?欢迎提供免费和商业产品建议。

如果它还可以警告不良做法,例如DSO接口(interface)中的内联函数和默认函数参数,那就太好了。

最佳答案

abi-compliance-checker - 用于检查共享 C/C++ 库 (DSO) 的向后二进制/源代码级兼容性的工具:

A tool for checking backward binary and source-level compatibility of a C/C++ library. The tool checks header files and shared libraries of old and new versions and analyzes changes in API and ABI (ABI=API+compiler ABI) that may break binary and/or source compatibility: changes in calling stack, v-table changes, removed symbols, renamed fields, etc.

enter image description here

icheck - C 接口(interface) ABI/API 检查器:

A tool for statically checking C interfaces for API and ABI changes. All changes to type declarations that can cause ABI changes should be detected, along with most API changes. icheck is intended for use with libraries, as a method of preventing ABI drift.

shlib-compat - 带有符号版本控制的共享库的 ABI 兼容性检查器:

shlib-compat uses dwarf debugging symbols to recreate and compare definitions of exported symbols, including function arguments and structural types.

您也可能对 linux upstream tracker 感兴趣和 linux abi tracker服务。它们都由 abi-compliance-checker 工具提供支持。

关于c++ - 用于检测 C++ 中 ABI 中断的静态分析工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1969916/

相关文章:

c++ - 使用 extern 从 Haxe 访问 C++ 类

c++ - 计算斐波那契数的模板元编程

python - 如何使用 ctypes 将 byteArray 传递给以 char* 作为参数的 C 函数?

android - DLL 到 Android Eclipse 项目

c - 更新多个进程使用的共享库中的全局变量

c++ - 无法在动态链接库中找到过程入口点 _ZNSt7_cxx1112basic_stringlcSt11char_traitslcESalcEEC1Ev

C++ 最大公约数

javascript - 算法识别javascript中的纯函数

gcc - 如何使用 gcc 确定嵌入式系统中的最大堆栈使用量?

C++ 和覆盖问题